Bug#691715: [rt.cpan.org #80458] libtext-bibtex-perl: syntactically invalid BibTeX file crashes perl

David Bremner via RT bug-Text-BibTeX at rt.cpan.org
Tue Oct 30 00:59:53 UTC 2012


<URL: https://rt.cpan.org/Ticket/Display.html?id=80458 >


I was able to duplicate the crash with the upstream version by adding 
the definition _FORTIFY_SOURCE=2 or _FORTIFY_SOURCE=1

--- a/inc/MyBuilder.pm
+++ b/inc/MyBuilder.pm
@@ -168,6 +168,7 @@ sub ACTION_create_objects {
         $object =~ s/\.c/.o/;
         next if $self->up_to_date($file, $object);
         $cbuilder->compile(object_file  => $object,
+                          extra_compiler_flags=>["-D_FORTIFY_SOURCE=2"],
                            source       => $file,
                            include_dirs => ["btparse/src"]);
     }

FORTIFY_SOURCE attempts to catch some buffer overflows; the best
reference I could find at the moment is 

http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html



More information about the pkg-perl-maintainers mailing list