svashisht / rpms / bash

Forked from rpms/bash 4 years ago
Clone

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

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