Allow optional double quotes in dd parameters on macOS (#621)

This commit is contained in:
Paul Kulchenko 2022-09-14 22:53:20 -07:00 committed by GitHub
parent 3f49889841
commit 418bcb39af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -160,8 +160,8 @@ void GetMachoPayload(const char *image, size_t imagesize, int *out_offset,
script += 6;
DCHECK_EQ(REG_OK, regcomp(&rx,
"bs=([ [:digit:]]+) "
"skip=\"([ [:digit:]]+)\" "
"count=\"([ [:digit:]]+)\"",
"skip=\"?([ [:digit:]]+)\"? "
"count=\"?([ [:digit:]]+)\"?",
REG_EXTENDED));
rc = regexec(&rx, script, 4, rm, 0);
if (rc != REG_OK) {