Commit 07b3bf8
committed
Replace sprintf with snprintf
In C99 7.19.6.5 sprintf, "If copying takes place between objects
that overlap, the behavior is undefined".
Replace sprintf with snprintf and provide a clear buffer size to
ensure undefined behavior does not occur.
And the sizeof(buff) + 1 includes the null terminator.1 parent 2cfba0f commit 07b3bf8
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | | - | |
| 341 | + | |
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
| |||
0 commit comments