aboutsummaryrefslogtreecommitdiff
path: root/lib/memdebug.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-05-04 23:37:24 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-05-04 23:39:52 +0200
commit812da4190f8ac2f548f3bea09b85164b78d33347 (patch)
tree05918f43143c365d87ae0d85d41b89096278aba3 /lib/memdebug.c
parent312f36d453c763d96470d5d4cebd8aae28efe5dc (diff)
mprintf: allow %.s with data not being zero terminated
If the precision is indeed shorter than the string, don't strlen() to find the end because that's not how the precision operator works. I also added a unit test for curl_msnprintf to make sure this works and that the fix doesn't a few other basic use cases. I found a POSIX compliance problem that I marked TODO in the unit test, and I figure we need to add more tests in the future. Reported-by: Török Edwin
Diffstat (limited to 'lib/memdebug.c')
0 files changed, 0 insertions, 0 deletions