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

Issue 174342: Fix a bug where we reused a va_list across multiple calls. (Closed)

Created:
11 years, 4 months ago by Dean McNamee
Modified:
9 years, 7 months ago
Reviewers:
brettw, Evan Martin
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Fix a bug where we reused a va_list across multiple calls. The problem is that va_arg modifies the va_list so that the next call to va_arg returns the next argument. It looks like this code had attempted to not reuse the list by making a copy, but it passed the original instead of the copy.

Patch Set 1 #

Patch Set 2 : comment #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -9 lines) Patch
M base/string_util.cc View 1 2 chunks +9 lines, -9 lines 1 comment Download

Messages

Total messages: 4 (0 generated)
Dean McNamee
Yarz
11 years, 4 months ago (2009-08-24 20:23:39 UTC) #1
Evan Martin
LGTM if this fixes the crash I was seeing
11 years, 4 months ago (2009-08-24 20:27:49 UTC) #2
Evan Martin
http://codereview.chromium.org/174342/diff/1002/4 File base/string_util.cc (right): http://codereview.chromium.org/174342/diff/1002/4#newcode996 Line 996: result = vsnprintfT(&mem_buf[0], mem_length, format, ap_copy); (note for ...
11 years, 4 months ago (2009-08-24 20:28:50 UTC) #3
brettw
11 years, 4 months ago (2009-08-24 20:37:04 UTC) #4
Whoops! LGTM

Powered by Google App Engine
This is Rietveld 408576698