Browse Source

Minor changes.

* src/xheader.c (decode_record): Fix format specification.
(xattr_encode_keyword): Allocate space for terminating \0.
Samanta Navarro 3 years ago
parent
commit
8e82f367d4
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/xheader.c

+ 2 - 2
src/xheader.c

@@ -708,7 +708,7 @@ decode_record (struct xheader *xhdr,
   if (len_max < len)
     {
       int len_len = len_lim - p;
-      ERROR ((0, 0, _("Extended header length %*s is out of range"),
+      ERROR ((0, 0, _("Extended header length %.*s is out of range"),
 	      len_len, p));
       return false;
     }
@@ -919,7 +919,7 @@ xattr_encode_keyword(const char *keyword)
     {
       char c = *keyword;
 
-      if (bp + 2 /* enough for URL encoding also.. */ >= encode_buffer_size)
+      if (bp + 3 /* enough for URL encoding also.. */ >= encode_buffer_size)
         {
           encode_buffer = x2realloc (encode_buffer, &encode_buffer_size);
         }