Commit ID 0caf17dd21b7399b670fae37cca364f39207ee56
|
Contributor: | Daniele Forsi | Files Modified: | 1 |
| Date: | 04-April-2012 at 13:35 | Lines Added: | 5 | |
| Repository: | git://git.savannah.nongnu.org/gnokii.git master | Lines Removed: | 5 | |
| Commit Comment: | Fix buffer read overflow Uncovered by previous off-by-ones fixe. Since str is post-incremented in the while loop, the following if statement will access memory after the end of the buffer if the exit condition was *str== 0 or max==0 Fixes: 1 errors in context 1 of 2: Conditional jump or move depends on uninitialised value(s) at 0x809A967: findcrlf (atgen.c:3460) by 0x809AAB9: splitlines (atgen.c:3426) by 0x809C4F3: ReplyGetCharset (atgen.c:2549) by 0x8062B53: sm_incoming_function (gsm-statemachine.c:115) by 0x80B97AB: atbus_loop (atbus.c:222) by 0x8062300: gn_sm_loop (gsm-statemachine.c:68) by 0x80627B9: __sm_block_timeout (gsm-statemachine.c:236) by 0x809B35B: AT_GetCharset (atgen.c:846) by 0x80A1794: Initialise (atgen.c:665) by 0x806154C: register_driver (gsm-api.c:92) by 0x8061762: gn_gsm_initialise (gsm-api.c:142) by 0x8061136: gn_lib_phone_open (libfunctions.c:175) Uninitialised value was created by a heap allocation at 0x4025BD3: malloc (vg_replace_malloc.c:236) by 0x4025C5D: realloc (vg_replace_malloc.c:525) by 0x80B971B: atbus_loop (atbus.c:144) by 0x8062300: gn_sm_loop (gsm-statemachine.c:68) by 0x80627B9: __sm_block_timeout (gsm-statemachine.c:236) by 0x809B35B: AT_GetCharset (atgen.c:846) by 0x80A1794: Initialise (atgen.c:665) by 0x806154C: register_driver (gsm-api.c:92) by 0x8061762: gn_gsm_initialise (gsm-api.c:142) by 0x8061136: gn_lib_phone_open (libfunctions.c:175) by 0x804D0C1: parse_options (gnokii.c:394) by 0x804D18E: main (gnokii.c:1234) |
|||
| Language | Code Added | Code Removed | Comments Added | Comment Removed | Blanks Added | Blanks Removed | |
|---|---|---|---|---|---|---|---|
| C | 4 | 4 | 1 | 1 | 0 | 0 | |
| File | Language | Code Added | Code Removed | Comments Added | Comment Removed | Blanks Added | Blanks Removed |
|---|---|---|---|---|---|---|---|
| common/phones/atgen.c | C | 4 | 4 | 1 | 1 | 0 | 0 |
Copyright
©
2013
Black Duck Software, Inc.
and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a
Creative Commons Attribution 3.0 Unported License
. Ohloh
®
and the Ohloh logo are trademarks of
Black Duck Software, Inc.
in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.