nalika / rpms / bash

Forked from rpms/bash 2 years ago
Clone

Blame SOURCES/bash-4.4-param-expansion.patch

a01f16
diff --git a/parse.y b/parse.y
a01f16
index 9a78d0c..7df7d99 100644
a01f16
--- a/parse.y
a01f16
+++ b/parse.y
a01f16
@@ -4993,7 +4993,8 @@ decode_prompt_string (string)
a01f16
   struct dstack save_dstack;
a01f16
   int last_exit_value, last_comsub_pid;
a01f16
 #if defined (PROMPT_STRING_DECODE)
a01f16
-  int result_size, result_index;
a01f16
+  size_t result_size;
a01f16
+  int result_index;
a01f16
   int c, n, i;
a01f16
   char *temp, octal_string[4];
a01f16
   struct tm *tm;  
a01f16
diff --git a/subst.c b/subst.c
a01f16
index 9f15f0b..e5ffd03 100644
a01f16
--- a/subst.c
a01f16
+++ b/subst.c
a01f16
@@ -644,11 +644,13 @@ unquoted_substring (substr, string)
a01f16
 INLINE char *
a01f16
 sub_append_string (source, target, indx, size)
a01f16
      char *source, *target;
a01f16
-     int *indx, *size;
a01f16
+     int *indx;
a01f16
+     size_t *size;
a01f16
 {
a01f16
   if (source)
a01f16
     {
a01f16
-      int srclen, n;
a01f16
+      int n;
a01f16
+      size_t srclen;
a01f16
 
a01f16
       srclen = STRLEN (source);
a01f16
       if (srclen >= (int)(*size - *indx))
a01f16
@@ -7676,7 +7678,7 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin
a01f16
   char *istring;
a01f16
 
a01f16
   /* The current size of the above object. */
a01f16
-  int istring_size;
a01f16
+  size_t istring_size;
a01f16
 
a01f16
   /* Index into ISTRING. */
a01f16
   int istring_index;
a01f16
diff --git a/subst.h b/subst.h
a01f16
index b06e8c2..fc66faf 100644
a01f16
--- a/subst.h
a01f16
+++ b/subst.h
a01f16
@@ -127,7 +127,7 @@ extern int do_word_assignment __P((WORD_DESC *));
a01f16
    of space allocated to TARGET.  SOURCE can be NULL, in which
a01f16
    case nothing happens.  Gets rid of SOURCE by free ()ing it.
a01f16
    Returns TARGET in case the location has changed. */
a01f16
-extern char *sub_append_string __P((char *, char *, int *, int *));
a01f16
+extern char *sub_append_string __P((char *, char *, int *, size_t *));
a01f16
 
a01f16
 /* Append the textual representation of NUMBER to TARGET.
a01f16
    INDEX and SIZE are as in SUB_APPEND_STRING. */
a01f16
diff --git a/y.tab.c b/y.tab.c
a01f16
index d702554..31faa4a 100644
a01f16
--- a/y.tab.c
a01f16
+++ b/y.tab.c
a01f16
@@ -7280,7 +7280,8 @@ decode_prompt_string (string)
a01f16
   struct dstack save_dstack;
a01f16
   int last_exit_value, last_comsub_pid;
a01f16
 #if defined (PROMPT_STRING_DECODE)
a01f16
-  int result_size, result_index;
a01f16
+  size_t result_size;
a01f16
+  int result_index;
a01f16
   int c, n, i;
a01f16
   char *temp, octal_string[4];
a01f16
   struct tm *tm;  
a01f16
-- 
a01f16
2.5.5
a01f16