Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(460)

Issue 254333002: Make base::ReadFileToString() return false on I/O error. (Closed)

Created:
6 years, 7 months ago by Thiemo Nagel
Modified:
6 years, 7 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Make base::ReadFileToString() return false on I/O error. It seems inconsistent that ReadFileToString() currently returns false when encountering a file open error but true upon file read error. This CL forces the return value to false upon encountering any kind of error and documents this behaviour. At that occasion, a test for path traversal prevention is added. BUG=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=267507

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fix EXPECT_EQ() parameter order. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -18 lines) Patch
M base/file_util.h View 2 chunks +17 lines, -15 lines 0 comments Download
M base/file_util.cc View 1 chunk +1 line, -0 lines 0 comments Download
M base/file_util_unittest.cc View 1 3 chunks +13 lines, -3 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Thiemo Nagel
Hi Will, may I kindly ask you to take a look at this CL? In ...
6 years, 7 months ago (2014-04-30 14:30:30 UTC) #1
willchan no longer on Chromium
This change LGTM, mod my nit on the test assertion. If you want to be ...
6 years, 7 months ago (2014-04-30 15:14:39 UTC) #2
Thiemo Nagel
Thank you! I won't email to chromium-dev if you don't consider it necessary. https://codereview.chromium.org/254333002/diff/1/base/file_util_unittest.cc File ...
6 years, 7 months ago (2014-04-30 16:11:32 UTC) #3
Thiemo Nagel
The CQ bit was checked by tnagel@chromium.org
6 years, 7 months ago (2014-04-30 16:57:28 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tnagel@chromium.org/254333002/20001
6 years, 7 months ago (2014-04-30 16:58:44 UTC) #5
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-04-30 17:03:39 UTC) #6
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium
6 years, 7 months ago (2014-04-30 17:03:40 UTC) #7
Thiemo Nagel
The CQ bit was checked by tnagel@chromium.org
6 years, 7 months ago (2014-05-01 08:23:29 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tnagel@chromium.org/254333002/20001
6 years, 7 months ago (2014-05-01 08:23:53 UTC) #9
commit-bot: I haz the power
6 years, 7 months ago (2014-05-01 10:40:56 UTC) #10
Message was sent while issue was closed.
Change committed as 267507

Powered by Google App Engine
This is Rietveld 408576698