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; script += 6;
DCHECK_EQ(REG_OK, regcomp(&rx, DCHECK_EQ(REG_OK, regcomp(&rx,
"bs=([ [:digit:]]+) " "bs=([ [:digit:]]+) "
"skip=\"([ [:digit:]]+)\" " "skip=\"?([ [:digit:]]+)\"? "
"count=\"([ [:digit:]]+)\"", "count=\"?([ [:digit:]]+)\"?",
REG_EXTENDED)); REG_EXTENDED));
rc = regexec(&rx, script, 4, rm, 0); rc = regexec(&rx, script, 4, rm, 0);
if (rc != REG_OK) { if (rc != REG_OK) {