Skip to content

Instantly share code, notes, and snippets.

@bsiegert
Created December 19, 2020 20:12
Show Gist options
  • Save bsiegert/f13c6a1d56af0de354acccbceb8cb7a2 to your computer and use it in GitHub Desktop.
Save bsiegert/f13c6a1d56af0de354acccbceb8cb7a2 to your computer and use it in GitHub Desktop.
Index: files/lib/parse-config.c
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pkg_install/files/lib/parse-config.c,v
retrieving revision 1.17
diff -u -r1.17 parse-config.c
--- files/lib/parse-config.c 11 Dec 2020 10:06:53 -0000 1.17
+++ files/lib/parse-config.c 19 Dec 2020 20:11:26 -0000
@@ -150,6 +150,10 @@
continue;
line += var_len + 1;
len -= var_len + 1;
+ while (len > 0 && isspace(*line)) {
+ line++;
+ len--;
+ }
if (config_tmp_variables[i])
value = xasprintf("%s\n%.*s",
config_tmp_variables[i], (int)len, line);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment