|
|
Chromium Code Reviews|
Created:
4 years, 9 months ago by erikchen Modified:
4 years, 9 months ago Reviewers:
Mark Mentovai CC:
chromium-reviews, vmpstr+watch_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
Descriptionbase: Add nullptr checks to logging.cc.
Avoid calling wstrlen() or strlen() on nullptrs, as that causes undefined
behavior.
BUG=593561
Committed: https://crrev.com/0c9fe71dfa3a702e9357835f5f144eb46314bf27
Cr-Commit-Position: refs/heads/master@{#380747}
Patch Set 1 #Patch Set 2 : #
Total comments: 1
Messages
Total messages: 38 (18 generated)
Description was changed from ========== base: Add a nullptr check in RawLog(). strlen() has undefined behavior when called on a nullptr. BUG=593561 ========== to ========== base: Add nullptr checks to logging.cc. Avoid calling wstrlen() or strlen() on nullptrs, as that causes undefined behavior. BUG=593561 ==========
erikchen@chromium.org changed reviewers: + mark@chromium.org
mark: Please review.
LGTM
https://codereview.chromium.org/1778083003/diff/20001/base/logging.cc File base/logging.cc (right): https://codereview.chromium.org/1778083003/diff/20001/base/logging.cc#newcode918 base/logging.cc:918: return out << (wstr ? base::WideToUTF8(wstr) : std::string()); Your description only mentions RawLog(). Make it a little more generic to cover this aspect of the change too.
Description was changed from ========== base: Add nullptr checks to logging.cc. Avoid calling wstrlen() or strlen() on nullptrs, as that causes undefined behavior. BUG=593561 ========== to ========== base: Add nullptr checks to logging.cc. Avoid calling wstrlen() or strlen() on nullptrs, as that causes undefined behavior. BUG=593561 ==========
On 2016/03/10 18:06:54, Mark Mentovai wrote: > https://codereview.chromium.org/1778083003/diff/20001/base/logging.cc > File base/logging.cc (right): > > https://codereview.chromium.org/1778083003/diff/20001/base/logging.cc#newcode918 > base/logging.cc:918: return out << (wstr ? base::WideToUTF8(wstr) : > std::string()); > Your description only mentions RawLog(). Make it a little more generic to cover > this aspect of the change too. The message that would have been committed to git was fine: "base: Add nullptr checks to logging.cc.". The problem is that the rietveld title still had the old message of "RawLog()". I still don't know why they don't just use the first line as the rietveld title. Fixed.
The CQ bit was checked by erikchen@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1778083003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1778083003/20001
It leaves the subject alone when you edit the description after an issue is initially created. Otherwise, Gmail would break messages into a new thread. Or at least it used to do that. Looks like it didn’t this time.
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by erikchen@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1778083003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1778083003/20001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by erikchen@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1778083003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1778083003/20001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by erikchen@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1778083003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1778083003/20001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by erikchen@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1778083003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1778083003/20001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by erikchen@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1778083003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1778083003/20001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by erikchen@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1778083003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1778083003/20001
Message was sent while issue was closed.
Description was changed from ========== base: Add nullptr checks to logging.cc. Avoid calling wstrlen() or strlen() on nullptrs, as that causes undefined behavior. BUG=593561 ========== to ========== base: Add nullptr checks to logging.cc. Avoid calling wstrlen() or strlen() on nullptrs, as that causes undefined behavior. BUG=593561 ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== base: Add nullptr checks to logging.cc. Avoid calling wstrlen() or strlen() on nullptrs, as that causes undefined behavior. BUG=593561 ========== to ========== base: Add nullptr checks to logging.cc. Avoid calling wstrlen() or strlen() on nullptrs, as that causes undefined behavior. BUG=593561 Committed: https://crrev.com/0c9fe71dfa3a702e9357835f5f144eb46314bf27 Cr-Commit-Position: refs/heads/master@{#380747} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/0c9fe71dfa3a702e9357835f5f144eb46314bf27 Cr-Commit-Position: refs/heads/master@{#380747} |
