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 3437019: [update_engine] handle NULL returns from strdup (Closed)

Created:
10 years, 3 months ago by Chris Masone
Modified:
9 years, 7 months ago
Reviewers:
petkov, adlr
CC:
chromium-os-reviews_chromium.org, petkov, adlr
Visibility:
Public.

Description

[update_engine] handle NULL returns from strdup grepped for calls to strdup, added code to handle NULL gracefully. BUG=chromium-os:6589 TEST=unit tests Change-Id: I95f07d591177711351abe268f88dbe0e24d39637 Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=c6c57a5

Patch Set 1 #

Total comments: 8

Patch Set 2 : address petkov comments, fix bug in NULL-terminating list of env vars #

Total comments: 7

Patch Set 3 : address comments #

Total comments: 4

Patch Set 4 : fixed nits. Pushing... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -3 lines) Patch
M dbus_service.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M subprocess.cc View 1 2 3 4 chunks +30 lines, -3 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Chris Masone
10 years, 3 months ago (2010-09-23 00:30:57 UTC) #1
petkov
Some nits and questions... http://codereview.chromium.org/3437019/diff/1/2 File dbus_service.cc (right): http://codereview.chromium.org/3437019/diff/1/2#newcode80 dbus_service.cc:80: gboolean alloc_successful = *current_operation && ...
10 years, 3 months ago (2010-09-23 16:34:54 UTC) #2
Chris Masone
http://codereview.chromium.org/3437019/diff/1/2 File dbus_service.cc (right): http://codereview.chromium.org/3437019/diff/1/2#newcode80 dbus_service.cc:80: gboolean alloc_successful = *current_operation && *new_version; On 2010/09/23 16:34:54, ...
10 years, 3 months ago (2010-09-23 17:46:05 UTC) #3
adlr
i guess i'm w/ darren on this on. i don't see how adding 'return 0' ...
10 years, 3 months ago (2010-09-23 18:21:21 UTC) #4
petkov
http://codereview.chromium.org/3437019/diff/6001/7001 File dbus_service.cc (right): http://codereview.chromium.org/3437019/diff/6001/7001#newcode80 dbus_service.cc:80: if (!(*current_operation && *new_version)) { I usually find if ...
10 years, 3 months ago (2010-09-23 18:27:10 UTC) #5
Chris Masone
http://codereview.chromium.org/3437019/diff/6001/7002 File subprocess.cc (right): http://codereview.chromium.org/3437019/diff/6001/7002#newcode44 subprocess.cc:44: int FreeArgvInError(char** argv) { On 2010/09/23 18:21:21, adlr wrote: ...
10 years, 3 months ago (2010-09-23 19:40:23 UTC) #6
petkov
LGTM w/ more nits. http://codereview.chromium.org/3437019/diff/13001/2003 File subprocess.cc (right): http://codereview.chromium.org/3437019/diff/13001/2003#newcode146 subprocess.cc:146: return 0; return false http://codereview.chromium.org/3437019/diff/13001/2003#newcode154 ...
10 years, 3 months ago (2010-09-23 19:55:21 UTC) #7
Chris Masone
10 years, 3 months ago (2010-09-23 20:03:08 UTC) #8
pushing...

http://codereview.chromium.org/3437019/diff/13001/2003
File subprocess.cc (right):

http://codereview.chromium.org/3437019/diff/13001/2003#newcode146
subprocess.cc:146: return 0;
On 2010/09/23 19:55:22, petkov wrote:
> return false
> 

Done.

http://codereview.chromium.org/3437019/diff/13001/2003#newcode154
subprocess.cc:154: return 0;
On 2010/09/23 19:55:22, petkov wrote:
> return false
> 

Done.

Powered by Google App Engine
This is Rietveld 408576698