Allow optional double quotes in dd parameters on macOS

This commit is contained in:
Paul Kulchenko 2022-09-14 17:18:50 -07:00
parent 1ad2f530f9
commit 251f051654

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) {