diff options
author | Daniel Stenberg <daniel@haxx.se> | 2014-05-04 23:37:24 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2014-05-04 23:39:52 +0200 |
commit | 812da4190f8ac2f548f3bea09b85164b78d33347 (patch) | |
tree | 05918f43143c365d87ae0d85d41b89096278aba3 /tests/data/test65 | |
parent | 312f36d453c763d96470d5d4cebd8aae28efe5dc (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 'tests/data/test65')
0 files changed, 0 insertions, 0 deletions