* use the hex-decoder instead of scanf
authorWilfried Göesgens <willi@citadel.org>
Thu, 12 Mar 2009 22:56:24 +0000 (22:56 +0000)
committerWilfried Göesgens <willi@citadel.org>
Thu, 12 Mar 2009 22:56:24 +0000 (22:56 +0000)
webcit/groupdav_main.c
webcit/utils.c

index 1b8a099df39f30bc12d036e2e5b6fdab285c591c..ce04ea675b8fbd3f5dcbc1317308b69ecf9e81c3 100644 (file)
@@ -66,7 +66,7 @@ void euid_unescapize(char *target, const char *source) {
                        hex[1] = source[a + 2];
                        hex[2] = 0;
                        b = 0;
-                       sscanf(hex, "%02x", &b);
+                       b = decode_hex(hex);
                        target[target_length] = b;
                        target[++target_length] = 0;
                        a += 2;
index 0c10e4d9a3e59d2a0985afda75d71d09529cd8c7..b42560f53cc02dd547e5df3120a7b616f991babb 100644 (file)
@@ -42,7 +42,7 @@ long unescape_input(char *buf)
                                hex[1] = buf[a + 2];
                                hex[2] = 0;
                                b = 0;
-                               sscanf(hex, "%02x", &b);
+                               b = decode_hex(hex);
                                buf[a] = (char) b;
                                len = buflen - a - 2;
                                if (len > 0)