[Debian-med-packaging] Bug#716353: biosquid: sreformat crash - Proposing patch

Martin Steghöfer martin at steghoefer.eu
Wed Oct 8 19:47:30 UTC 2014


Hi there! :-)

I've fixed the crash. It was a segmentation fault due to a faulty 
implementation of a command-line options parser.

The command line parser accessed invalid memory when a given option 
matched several option definitions as a prefix, but none of them exactly 
(e.g. "--s" as option with "--sam" and "--samfrac" as option 
definitions). This was due to an incorrect check of exact matching that 
tried to access "opt[i].name" with i being greater than the upper bound 
of the array "opt" in case of not having an exact match. Replaced it 
with the proper check.

Please find the patch attached.

I couldn't forward the patch to upstream because there doesn't seem to 
be an upstream any more... :-/

Cheers,
Martin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: getopt-segmentation-fault.patch
Type: text/x-diff
Size: 1036 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-med-packaging/attachments/20141008/7ca2d95e/attachment-0001.patch>


More information about the Debian-med-packaging mailing list