libdhcpcd: decode escaped \2XX and \\ correctly
[dhcpcd-ui] / src / libdhcpcd / dhcpcd.c
index 62b21ea6c35f5fab12de9e7703736aa0c038929e..1a25636261966e7630f1fb97bf7197a161674812 100644 (file)
@@ -379,8 +379,12 @@ dhcpcd_decode_string_escape(char *dst, size_t dlen, const char *src)
                        esc = *src++;
                        switch (esc) {
                        case '\\':
+                               if (dst)
+                                       *dst++ = esc;
+                               break;
                        case '0':
                        case '1':
+                       case '2':
                        case '3':
                        case '4':
                        case '5':