Only permit comments at beginning of line in file manifests (RhBug:112727)

We only permit comments at beginning of line in specs and macro
files too, of all things file manifests don't need anything fancier.
Resolves the oldest rpm bug in RH bugzilla, only took 16 years...
This commit is contained in:
Panu Matilainen 2019-10-29 09:59:23 +02:00 committed by Florian Festi
parent 4cae7bc073
commit 63930cd524
1 changed files with 2 additions and 1 deletions

View File

@ -84,7 +84,8 @@ rpmRC rpmReadPackageManifest(FD_t fd, int * argcPtr, char *** argvPtr)
}
/* Skip comments. */
if ((se = strchr(s, '#')) != NULL) *se = '\0';
if (*s == '#')
continue;
/* Trim white space. */
se = s + strlen(s);