summaryrefslogtreecommitdiffstats
path: root/remoting/jingle_glue
diff options
context:
space:
mode:
authorcbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-09 19:02:24 +0000
committercbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-09 19:02:24 +0000
commitc78559eabd562359ef23585df9268eeb5119b718 (patch)
treeb0bdc8252b10f3a1ba1d79ed4625ba61e7a13907 /remoting/jingle_glue
parent722d8eab5034806b347a17cd5c6a10a98feb35f9 (diff)
downloadchromium_src-c78559eabd562359ef23585df9268eeb5119b718.zip
chromium_src-c78559eabd562359ef23585df9268eeb5119b718.tar.gz
chromium_src-c78559eabd562359ef23585df9268eeb5119b718.tar.bz2
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 Review URL: http://codereview.chromium.org/2646004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49299 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/jingle_glue')
0 files changed, 0 insertions, 0 deletions