Skip Menu |

This queue is for tickets about the String-Comments-Extract CPAN distribution.

Report information
The Basics
Id: 78756
Status: new
Priority: 0/
Queue: String-Comments-Extract

People
Owner: Nobody in particular
Requestors: 'spro^^*%*^6ut# [...] &$%*c
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Crashes due to uninitialised variable
In some development releases of perl, on some platforms, this module crashes, but by chance. There is a C variable that is used before it has been initialised, resulting in erratic behaviour, depending on how other things happen to be arranged in memory. See the attached patch. See also <https://rt.perl.org/rt3/Ticket/Display.html?id=114004>.
Subject: sce-var-init-patch.text
diff -rup String-Comments-Extract-0.023-BzTIZU-orig/Extract.xs String-Comments-Extract-0.023-BzTIZU/Extract.xs --- String-Comments-Extract-0.023-BzTIZU-orig/Extract.xs 2012-08-02 08:12:26.000000000 +0200 +++ String-Comments-Extract-0.023-BzTIZU/Extract.xs 2012-08-02 08:12:44.000000000 +0200 @@ -283,7 +283,7 @@ void _slash_star_extract_identifier(slas void _slash_star_extract_regexp( slash_star_document* document, Node* node ) { const char* buffer = document->buffer; size_t offset = document->offset + 1; - int in_character_class; + int in_character_class = 0; while ( buffer[ offset ] != '/' || in_character_class ) { char chr = buffer[ offset ]; if ( chr == '\\' ) {