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

Issue 1077903002: Better fix for snprintf non-termination on windows. (Closed)

Created:
5 years, 8 months ago by Tom Sepez
Modified:
5 years, 8 months ago
Reviewers:
brucedawson
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 : Fix typo. #

Patch Set 3 : Forgot inline #

Patch Set 4 : Implement in fx_basic_util.cpp #

Patch Set 5 : Implement Bruce's suggestion about void returns. #

Total comments: 6

Patch Set 6 : MSVC version and printf-annotiations #

Patch Set 7 : Put annotation on correct argument. #

Patch Set 8 : Add void cast before _snprintf() just to say "I mean it man" #

Total comments: 2

Patch Set 9 : Fix #endif // comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -8 lines) Patch
M core/include/fxcrt/fx_system.h View 1 2 3 4 5 6 7 8 2 chunks +12 lines, -6 lines 0 comments Download
M core/src/fxcrt/fx_basic_util.cpp View 1 2 3 4 5 6 7 8 1 chunk +18 lines, -0 lines 0 comments Download
M core/src/fxcrt/fx_basic_wstring.cpp View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 17 (8 generated)
Tom Sepez
Bruce, for review.
5 years, 8 months ago (2015-04-09 23:39:28 UTC) #2
Tom Sepez
On 2015/04/09 23:39:28, Tom Sepez wrote: > Bruce, for review. Seems to build with void ...
5 years, 8 months ago (2015-04-10 17:59:45 UTC) #3
brucedawson
https://codereview.chromium.org/1077903002/diff/80001/core/include/fxcrt/fx_system.h File core/include/fxcrt/fx_system.h (right): https://codereview.chromium.org/1077903002/diff/80001/core/include/fxcrt/fx_system.h#newcode143 core/include/fxcrt/fx_system.h:143: #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ Consider making times version limited. ...
5 years, 8 months ago (2015-04-10 18:03:02 UTC) #4
Tom Sepez
Please re-review. https://codereview.chromium.org/1077903002/diff/80001/core/include/fxcrt/fx_system.h File core/include/fxcrt/fx_system.h (right): https://codereview.chromium.org/1077903002/diff/80001/core/include/fxcrt/fx_system.h#newcode143 core/include/fxcrt/fx_system.h:143: #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ On 2015/04/10 18:03:02, ...
5 years, 8 months ago (2015-04-10 18:23:40 UTC) #5
brucedawson
https://codereview.chromium.org/1077903002/diff/140001/core/include/fxcrt/fx_system.h File core/include/fxcrt/fx_system.h (right): https://codereview.chromium.org/1077903002/diff/140001/core/include/fxcrt/fx_system.h#newcode143 core/include/fxcrt/fx_system.h:143: // that always NUL-terminate. Say why we need to ...
5 years, 8 months ago (2015-04-10 18:43:19 UTC) #6
Tom Sepez
ps://codereview.chromium.org/1077903002/diff/140001/core/src/fxcrt/fx_basic_util.cpp#newcode180 > core/src/fxcrt/fx_basic_util.cpp:180: void FXSYS_vsnprintf(char *str, size_t > size, _Printf_format_string_ const char* fmt, va_list ap) ...
5 years, 8 months ago (2015-04-10 20:30:25 UTC) #14
Tom Sepez
On 2015/04/10 20:30:25, Tom Sepez wrote: > ps://codereview.chromium.org/1077903002/diff/140001/core/src/fxcrt/fx_basic_util.cpp#newcode180 > > core/src/fxcrt/fx_basic_util.cpp:180: void FXSYS_vsnprintf(char *str, size_t ...
5 years, 8 months ago (2015-04-10 20:40:20 UTC) #15
brucedawson
Excellent! Now lots of code is more secure, and this is more efficient than the ...
5 years, 8 months ago (2015-04-10 21:33:10 UTC) #16
Tom Sepez
5 years, 8 months ago (2015-04-10 21:43:20 UTC) #17
Message was sent while issue was closed.
Committed patchset #9 (id:300001) manually as
d794018606dfdb62f87adf065c5ba48a4607d92b (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698