Attention is currently required from: Bao Zheng, Jason Glenesk, Raul Rangel, Martin Roth, Paul Menzel, Zheng Bao.
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/54946 )
Change subject: amdfwtool: Copy string in a safer way
......................................................................
Patch Set 13: Code-Review+1
(1 comment)
File util/amdfwtool/data_parse.c:
https://review.coreboot.org/c/coreboot/+/54946/comment/5dde0339_398c24bf
PS13, Line 453: + 2
not 100% sure if this needs to be + 2 or if + 1 would be sufficient.
dir has a maximum length of MAX_LINE_SIZE including the final null-byte. from &(oneline[match[2].rm_so]) a maximum of MAX_LINE_SIZE bytes will be used, which don't have to include the final null-byte. with the / in between, i'd assume that we need at most MAX_LINE_SIZE * 2 + 1 bytes: MAX_LINE_SIZE - 1 for dir, 1 for / and MAX_LINE_SIZE + 1 for &(oneline[match[2].rm_so]). still better allocation one byte more than we'll need that not allocating enough bytes
--
To view, visit
https://review.coreboot.org/c/coreboot/+/54946
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I609d9ce405d01c57b1847a6310630ea0341e13be
Gerrit-Change-Number: 54946
Gerrit-PatchSet: 13
Gerrit-Owner: Bao Zheng
fishbaozi@gmail.com
Gerrit-Reviewer: Felix Held
felix-coreboot@felixheld.de
Gerrit-Reviewer: Jason Glenesk
jason.glenesk@gmail.com
Gerrit-Reviewer: Marshall Dawson
marshalldawson3rd@gmail.com
Gerrit-Reviewer: Martin Roth
martinroth@google.com
Gerrit-Reviewer: Raul Rangel
rrangel@chromium.org
Gerrit-Reviewer: Zheng Bao
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Patrick Georgi
pgeorgi@google.com
Gerrit-CC: Paul Menzel
paulepanter@mailbox.org
Gerrit-Attention: Bao Zheng
fishbaozi@gmail.com
Gerrit-Attention: Jason Glenesk
jason.glenesk@gmail.com
Gerrit-Attention: Raul Rangel
rrangel@chromium.org
Gerrit-Attention: Martin Roth
martinroth@google.com
Gerrit-Attention: Paul Menzel
paulepanter@mailbox.org
Gerrit-Attention: Zheng Bao
Gerrit-Comment-Date: Mon, 30 Aug 2021 15:49:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment