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

Issue 2732913004: Post fix of CL "declare a variable before using it" (Closed)

Created:
3 years, 9 months ago by chengx
Modified:
3 years, 9 months ago
Reviewers:
vabr (Chromium)
CC:
chromium-reviews, rouslan+autofill_chromium.org, rogerm+autofillwatch_chromium.org, sebsg+autofillwatch_chromium.org, browser-components-watch_chromium.org, mathp+autofillwatch_chromium.org, vabr+watchlistautofill_chromium.org, estade+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Post fix of CL "declare a variable before using it" PVS-Studio pointed out that an uninitialized variable 'limit' is used to initialize itself, which may cause undefined behavior. Other calls to StringToSizeT() don't have this issue. After my landing crrev.com/2724153004 for the fix, the declaration and assignment of variable |limit| are separate. If somebody adds code between them, there will be a non-trivial interval of |limit| having an undefined value. This CL fixed this by initializing |limit| right after its declaration. BUG=697659 Review-Url: https://codereview.chromium.org/2732913004 Cr-Commit-Position: refs/heads/master@{#454950} Committed: https://chromium.googlesource.com/chromium/src/+/ed17a3d795edc5af91cd6074a7c299425b1fe9d7

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -1 line) Patch
M components/autofill/core/browser/personal_data_manager.cc View 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 15 (11 generated)
chengx
Hi vabr@, this is the post fix the my previous CL crrev.com/2724153004. PTAL~ Also, if ...
3 years, 9 months ago (2017-03-06 19:47:51 UTC) #7
vabr (Chromium)
On 2017/03/06 19:47:51, chengx wrote: > Hi vabr@, this is the post fix the my ...
3 years, 9 months ago (2017-03-06 19:50:38 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2732913004/1
3 years, 9 months ago (2017-03-06 20:44:13 UTC) #12
commit-bot: I haz the power
3 years, 9 months ago (2017-03-06 20:50:25 UTC) #15
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/ed17a3d795edc5af91cd6074a7c2...

Powered by Google App Engine
This is Rietveld 408576698