Ignore:
Timestamp:
May 24, 2007, 5:10:51 AM (18 years ago)
Author:
bird
Message:

Fixed a few potential variable_buffer realloc problems.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gmakenew/remake.c

    r903 r910  
    809809#ifdef CONFIG_WITH_EXTENDED_NOTPARALLEL
    810810  /* update not_parallel if the file was flagged for that. */
    811   if (   ran 
    812       && (file->command_flags & (COMMANDS_NOTPARALLEL | COMMANDS_NO_COMMANDS)) 
     811  if (   ran
     812      && (file->command_flags & (COMMANDS_NOTPARALLEL | COMMANDS_NO_COMMANDS))
    813813         == COMMANDS_NOTPARALLEL)
    814814    {
     
    15031503      static int libdir_maxlen = -1;
    15041504      char *libbuf = variable_expand ("");
     1505      const size_t libbuf_offset = libbuf - variable_buffer; /* bird */
    15051506
    15061507      /* Expand the pattern using LIBNAME as a replacement.  */
     
    15251526        p4 = variable_buffer_output (p4, p3+1, len - (p3-p));
    15261527        p[len] = c;
     1528        libbuf = variable_buffer + libbuf_offset; /* bird - variable_buffer may have been reallocated. */
    15271529      }
    15281530
Note: See TracChangeset for help on using the changeset viewer.