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

Issue 2646004: More robust handling of GSSAPI error strings... (Closed)

Created:
10 years, 6 months ago by rsleevi-old
Modified:
9 years, 7 months ago
Reviewers:
cbentzel, wtc, ahendrickson
CC:
chromium-reviews, John Grabowski, cbentzel+watch_chromium.org, pam+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

More robust handling of GSSAPI error strings RFC 2744 does not require string types to be NULL terminated, because their length is explicitly passed as part of the gss_buffer_desc (see Section 3.2.). As such, when printing error strings, the length should be explicitly stated. This is shown in the example code of gss_display_status in Section 5.11. While in practice this is the case (at least from checking MIT and Heimdal's error handling code), it doesn't hurt to be defensive. In addition, there are some conditions where value may be NULL or length may be 0, so make sure to check for these prior to calling StringPrintf, so as not to crash. Finally, for the extreme defensive case, make sure that the length (which is a size_t) is capped at INT_MAX prior to printing. Contributed by ryan.sleevi@gmail.com BUG=33033 TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=49299

Patch Set 1 #

Total comments: 2

Patch Set 2 : Individual status message limit of 4K, total message of 8K-1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -6 lines) Patch
MM net/http/http_auth_gssapi_posix.cc View 1 2 chunks +20 lines, -6 lines 1 comment Download

Messages

Total messages: 9 (0 generated)
rsleevi-old
I wasn't sure whether it was more appropriate to comment on http://codereview.chromium.org/2268002 given that it ...
10 years, 6 months ago (2010-06-04 22:39:42 UTC) #1
cbentzel
Thanks for providing this fix! Can you add yourself to the AUTHORS file? See http://dev.chromium.org/developers/contributing-code ...
10 years, 6 months ago (2010-06-07 17:45:11 UTC) #2
cbentzel
On Mon, Jun 7, 2010 at 1:45 PM, <cbentzel@chromium.org> wrote: > > > Can you ...
10 years, 6 months ago (2010-06-07 17:49:05 UTC) #3
cbentzel
On Mon, Jun 7, 2010 at 1:48 PM, Chris Bentzel <cbentzel@chromium.org> wrote: > > > ...
10 years, 6 months ago (2010-06-07 17:49:13 UTC) #4
rsleevi-old
As I don't have committer access, if it looks good with the requested changes, please ...
10 years, 6 months ago (2010-06-08 01:18:33 UTC) #5
cbentzel
On 2010/06/08 01:18:33, rsleevi wrote: > As I don't have committer access, if it looks ...
10 years, 6 months ago (2010-06-08 13:11:55 UTC) #6
ahendrickson
LGTM. On 2010/06/08 13:11:55, cbentzel wrote: > On 2010/06/08 01:18:33, rsleevi wrote: > > As ...
10 years, 6 months ago (2010-06-08 16:30:24 UTC) #7
cbentzel
> > LGTM. I'll commit it today. Given the state of the tree today, this ...
10 years, 6 months ago (2010-06-08 18:29:20 UTC) #8
wtc
10 years, 6 months ago (2010-06-12 00:25:33 UTC) #9
http://codereview.chromium.org/2646004/diff/7001/8001
File net/http/http_auth_gssapi_posix.cc (right):

http://codereview.chromium.org/2646004/diff/7001/8001#newcode225
net/http/http_auth_gssapi_posix.cc:225: gssapi::OM_uint32 min_stat;
Andy, could you rename min_stat to minor_status and
maj_stat to major_status?  The Style Guide doesn't allow
this kind of abbreviation.  Thanks.

Powered by Google App Engine
This is Rietveld 408576698