Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Sep 14, 2011
  1. @peff @gitster

    quote: provide sq_dequote_to_argv_array

    peff authored gitster committed
    This is similar to sq_dequote_to_argv, but more convenient
    if you have an argv_array. It's tempting to just feed the
    components of the argv_array to sq_dequote_to_argv instead,
    but:
    
      1. It wouldn't maintain the NULL-termination invariant
         of argv_array.
    
      2. It doesn't match the memory ownership policy of
         argv_array (in which each component is free-able, not a
         pointer into a separate buffer).
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Feb 6, 2010
  1. @peff @gitster

    Fix invalid read in quote_c_style_counted

    peff authored gitster committed
    This function did not work on strings that were not NUL-terminated. It
    reads through a length-bounded string, searching for characters in need of
    quoting. After we find one, we output the quoted character, then advance
    our pointer to find the next one. However, we never decremented the
    length, meaning we ended up looking at whatever random junk was stored
    after the string.
    
    This bug was not found by the existing tests because most code paths feed
    a NUL-terminated string. The notable exception is a directory name being
    fed by ls-tree.
    
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
Commits on Jun 28, 2006
  1. @peff

    quote.c: silence compiler warnings from EMIT macro

    peff authored Junio C Hamano committed
    Signed-off-by: Jeff King <peff@peff.net>
    Signed-off-by: Junio C Hamano <junkio@cox.net>
Something went wrong with that request. Please try again.