]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
libdep plugin: fix bugs in parser and drop escaping
authorHarmen Stoppels <me@harmenstoppels.nl>
Mon, 24 Jun 2024 15:00:14 +0000 (16:00 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 24 Jun 2024 15:00:14 +0000 (16:00 +0100)
commit3af54857cd2b63412fb4517aa2a9ecd360f6426c
tree6bce416afbef0ae4d1f1f2bfc0239eacade68b09
parente13c4e58907998631962b8d79f7bcf562e461541
libdep plugin: fix bugs in parser and drop escaping

  PR ld/31906
  * libdep_plugin.c (str2vec): Fix bug where null byte was not copied on memmove during quote handling and escaping, causing repeat of the last character in the last argument.
  Fix buffer overflow in **res when arguments were separated by `\t` instead of ` `.
  Remove handling of the escape character `\`, as it made it impossible to specify paths containing `\`
  -- the implementation merely dropped `\`, and was affected by the memmove bug, so this should not be breaking; just single and double quotes are sufficient to deal with white space and quote characters, there is no need for escaping.
  Handle syntax errors   on unterminated quotes.
  Make the parser linear time instead of   quadratic.
ld/libdep_plugin.c