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

Issue 7134090: Avoid abs() of unsigned values. (Closed)

Created:
9 years, 6 months ago by tzik
Modified:
9 years, 6 months ago
CC:
chromium-reviews, brettw-cc_chromium.org
Visibility:
Public.

Description

Avoid abs() of unsigned values. BUG=None TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=89173

Patch Set 1 #

Total comments: 6

Patch Set 2 : '' #

Total comments: 2

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -18 lines) Patch
M base/mime_util_xdg.cc View 1 2 2 chunks +16 lines, -18 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
tzik
Hi. I found a abs() of size_t and comparision of possibly underflowed values, and I'm ...
9 years, 6 months ago (2011-06-13 06:38:27 UTC) #1
Lei Zhang
Hmm, the code here originally came from http://code.google.com/p/google-gadgets-for-linux/source/browse/trunk/ggadget/xdg/icon_theme.cc. However, it doesn't even look right in ...
9 years, 6 months ago (2011-06-13 22:01:15 UTC) #2
tzik
Thanks for reviewing. http://codereview.chromium.org/7134090/diff/1/base/mime_util_xdg.cc File base/mime_util_xdg.cc (right): http://codereview.chromium.org/7134090/diff/1/base/mime_util_xdg.cc#newcode328 base/mime_util_xdg.cc:328: return std::max(size, info->size) - std::min(size, info->size); ...
9 years, 6 months ago (2011-06-14 02:52:52 UTC) #3
Lei Zhang
http://codereview.chromium.org/7134090/diff/4001/base/mime_util_xdg.cc File base/mime_util_xdg.cc (right): http://codereview.chromium.org/7134090/diff/4001/base/mime_util_xdg.cc#newcode342 base/mime_util_xdg.cc:342: return info->size + info->threshold - size; I think this ...
9 years, 6 months ago (2011-06-14 03:02:27 UTC) #4
tzik
http://codereview.chromium.org/7134090/diff/4001/base/mime_util_xdg.cc File base/mime_util_xdg.cc (right): http://codereview.chromium.org/7134090/diff/4001/base/mime_util_xdg.cc#newcode342 base/mime_util_xdg.cc:342: return info->size + info->threshold - size; On 2011/06/14 03:02:28, ...
9 years, 6 months ago (2011-06-14 03:40:25 UTC) #5
Lei Zhang
LGTM
9 years, 6 months ago (2011-06-14 20:23:02 UTC) #6
commit-bot: I haz the power
Presubmit check for 7134090-10001 failed and returned exit status 1. Running presubmit commit checks ...
9 years, 6 months ago (2011-06-15 01:58:41 UTC) #7
Lei Zhang
+evan or willchan for OWNER review.
9 years, 6 months ago (2011-06-15 02:22:08 UTC) #8
willchan no longer on Chromium
LGTM rubberstamp
9 years, 6 months ago (2011-06-15 11:26:43 UTC) #9
commit-bot: I haz the power
9 years, 6 months ago (2011-06-15 13:14:31 UTC) #10
Change committed as 89173

Powered by Google App Engine
This is Rietveld 408576698