Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v.in.dwg: Avoid using same variable as parameter and destination in s…
…printf (OSGeo#4262) v.in.dwg: Avoid using same variable as parameter and dest in sprintf Currently, one instance of sprintf has the same variable as parameter and destination in sprintf. This scenario leads to undefined behavior in C. Modify the code to: 1. Write initial error string using snprintf() onto the buffer. Using snprintf() makes sure that we stay within the buffer size and avoid overflow errors. 2. Use snprintf() again to write another error string at the end of previous error string in the same buffer. We again use snprintf() to make sure we are not overflowing the buffer with data. Signed-off-by: Mohan Yelugoti <[email protected]>
- Loading branch information