odin1314 / yara-project

Automatically exported from code.google.com/p/yara-project
Apache License 2.0
0 stars 0 forks source link

Fix abort issue on ARM platforms #83

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
On an ARM architecture yara send SIGABORT signal while flag processing.

There, 'char' is unsigned, so once assigned '-1' from getopt, it gets
the value 255. Then, it compared to '-1' gives false.

yara.c:402     char c;
...
yara.c:407     while ((c = getopt (argc, (char**) argv, "rnsvgml:t:i:d:f")) != 
-1)

If you change the definition of 'c' from char to int, the problem is solved. 

yara.c:402     int c;

Original issue reported on code.google.com by pkedu...@gmail.com on 22 Apr 2013 at 9:02

GoogleCodeExporter commented 9 years ago

Original comment by plus...@gmail.com on 23 May 2013 at 1:52