Ignore:
Timestamp:
Oct 11, 2008, 9:34:24 PM (17 years ago)
Author:
bird
Message:

kmk: fixed string termination for three strcache_add_len calls. (it will copy the string to the stack if it's not terminated.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/function.c

    r1836 r1838  
    289289        }
    290290    }
     291#ifndef CONFIG_WITH_VALUE_LENGTH
    291292  if (doneany)
    292293    /* Kill the last space.  */
    293294    --o;
     295#else
     296  /* Kill the last space and make sure there is a terminator there
     297     so that strcache_add_len doesn't have to do a lot of exacty work
     298     when expand_deps sends the output its way. */
     299  if (doneany)
     300    *--o = '\0';
     301  else
     302    o = variable_buffer_output (o, "\0", 1) - 1;
     303#endif
    294304
    295305  return o;
Note: See TracChangeset for help on using the changeset viewer.