EdisonWangB / pcmanx-gtk2

Automatically exported from code.google.com/p/pcmanx-gtk2
GNU General Public License v2.0
0 stars 0 forks source link

Segfault caused by strncmp #62

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Login a system that $LANG wasn't set or unset $LANG
2. Launch pcmanx
3. Crash due to segfault

In src/core/site.cpp, the returned string of getenv(LANG) was used in strncmp() 
without checking if the string was valid or not. A segfault could happen if 
$LANG wasn't set.

The patch was attached.

Original issue reported on code.google.com by chingp...@gmail.com on 4 Sep 2012 at 4:30

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks 
I'll try it tonight

Original comment by swy...@gmail.com on 4 Sep 2012 at 11:33

GoogleCodeExporter commented 8 years ago
Merged in commit 9af7012a31f4d55811d5c5570a3308fa97e36108

Thanks!

Original comment by jserv.tw@gmail.com on 5 Sep 2012 at 3:50