|
|
Chromium Code Reviews|
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. |
DescriptionPost 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 #
Messages
Total messages: 15 (11 generated)
The CQ bit was checked by chengx@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Initialize limit to SIZE_MAX. BUG=697659 ========== to ========== 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 landing crrev.com/2724153004 for the fix, the declaration and assignment of variable |limit| are separate, and 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 ==========
Description was changed from ========== 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 landing crrev.com/2724153004 for the fix, the declaration and assignment of variable |limit| are separate, and 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 ========== to ========== 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 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 ==========
Description was changed from ========== 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 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 ========== to ========== 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 ==========
chengx@chromium.org changed reviewers: + vabr@chromium.org
Hi vabr@, this is the post fix the my previous CL crrev.com/2724153004. PTAL~ Also, if you think this post fix is fine, could you please also give me a LGTM for my previous CL? I guess it is your "not LGTM" that marked your status "red" for that CL while it is green for reviewers who give LGTM. The red color indicates it is a problematic CL I suppose.
On 2017/03/06 19:47:51, chengx wrote: > Hi vabr@, this is the post fix the my previous CL crrev.com/2724153004. PTAL~ > > Also, if you think this post fix is fine, could you please also give me a LGTM > for my previous CL? I guess it is your "not LGTM" that marked your status "red" > for that CL while it is green for reviewers who give LGTM. The red color > indicates it is a problematic CL I suppose. LGTM, thanks for the quick fix! Vaclav
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by chengx@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 1, "attempt_start_ts": 1488833022153040, "parent_rev":
"4a6080201a29001f398861f94f8a473d646facd2", "commit_rev":
"ed17a3d795edc5af91cd6074a7c299425b1fe9d7"}
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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/+/ed17a3d795edc5af91cd6074a7c2... ==========
Message was sent while issue was closed.
Committed patchset #1 (id:1) as https://chromium.googlesource.com/chromium/src/+/ed17a3d795edc5af91cd6074a7c2... |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
