瀏覽代碼

tar: don't truncate diagnostic

* src/list.c (from_header): Fix buffer size calculation when
generating a diagnostic.
Paul Eggert 12 年之前
父節點
當前提交
8c0146d2c9
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/list.c

+ 1 - 1
src/list.c

@@ -865,7 +865,7 @@ from_header (char const *where0, size_t digs, char const *type,
 
 	  while (where0 != lim && ! lim[-1])
 	    lim--;
-	  quotearg_buffer (buf, sizeof buf, where0, lim - where, o);
+	  quotearg_buffer (buf, sizeof buf, where0, lim - where0, o);
 	  if (!silent)
 	    ERROR ((0, 0,
 		    /* TRANSLATORS: Second %s is a type name (gid_t,uid_t,etc.) */