commit | 8399ff337e75d199fa97b10677b08abbf073a857 | [log] [tgz] |
---|---|---|
author | Daniel Veillard <veillard@src.gnome.org> | Wed Sep 22 21:57:53 2004 +0000 |
committer | Daniel Veillard <veillard@src.gnome.org> | Wed Sep 22 21:57:53 2004 +0000 |
tree | 02a7afdddbd83de4f65b84e78794e734ebb82511 | |
parent | 4edd3ed8c53ca8a00cca90d669e5847a602bec3b [diff] [blame] |
couple of memory fixes from Mark Vakoc reported by Purify on Windows. * threads.c uri.c: couple of memory fixes from Mark Vakoc reported by Purify on Windows. Daniel
diff --git a/uri.c b/uri.c index 10e7db6..55210a6 100644 --- a/uri.c +++ b/uri.c
@@ -828,7 +828,7 @@ in = str; out = ret; while(len > 0) { - if ((*in == '%') && (is_hex(in[1])) && (is_hex(in[2]))) { + if ((len > 2) && (*in == '%') && (is_hex(in[1])) && (is_hex(in[2]))) { in++; if ((*in >= '0') && (*in <= '9')) *out = (*in - '0');