Commit 76732bb
committed
Change StringValuePtr to StringValueCStr
StringValuePtr doesn't guarantee a NULL byte at the end of the char * it
returns. The for loop in the `parse_version_number` depends on a NULL
byte in the string in order to stop the loop. Since `StringValuePtr`
doesn't guarantee a NULL byte in the `char *`, it's possible the for
loop could read past the end of the string, and `offset` would end up
being larger than the number of bytes that are actually in the string.1 parent 433ebd3 commit 76732bb
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
239 | | - | |
| 238 | + | |
| 239 | + | |
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| |||
0 commit comments