aboutsummaryrefslogtreecommitdiff
path: root/lib/escape.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-06-24 11:54:11 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-06-24 11:54:11 +0000
commitfeb2dd283533f842c9b6e4cc2fcc7fd35638d5a0 (patch)
treef0ecc2bd74917e67e3e9853e04a6ca16c2770eb3 /lib/escape.c
parent5e34f3dc0133333fb398dd4b285a63f58aa441da (diff)
Replaced all uses of sprintf() with the safer snprintf(). It is just a
precaution to prevent mistakes to lead to buffer overflows.
Diffstat (limited to 'lib/escape.c')
-rw-r--r--lib/escape.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/escape.c b/lib/escape.c
index 600cece7c..00e2fae6e 100644
--- a/lib/escape.c
+++ b/lib/escape.c
@@ -68,7 +68,7 @@ char *curl_escape(const char *string, int length)
ns = testing_ptr;
}
}
- sprintf(&ns[strindex], "%%%02X", in);
+ snprintf(&ns[strindex], 4, "%%%02X", in);
strindex+=3;
}