ソースを参照

libdpkg: Fix bogus handling of '\\' in path_quote_filename

When quoting backslash, the code was not advancing the source, so the
destination was getting repeated backslashes until the buffer was full.
Guillem Jover 16 年 前
コミット
8e5c039991
共有1 個のファイルを変更した1 個の追加0 個の削除を含む
  1. 1 0
      lib/dpkg/path.c

+ 1 - 0
lib/dpkg/path.c

@@ -118,6 +118,7 @@ path_quote_filename(char *dst, const char *src, size_t n)
 		case '\\':
 			*dst++ = '\\';
 			*dst++ = '\\';
+			src++;
 			size -= 2;
 			break;
 		default: