]> git.ipfire.org Git - thirdparty/krb5.git/commit
Fix incorrect recv() size calculation in libkrad
authorNathaniel McCallum <npmccallum@redhat.com>
Tue, 21 Jun 2016 20:12:36 +0000 (16:12 -0400)
committerGreg Hudson <ghudson@mit.edu>
Wed, 22 Jun 2016 17:24:19 +0000 (13:24 -0400)
commitc969e8a37617e9c7743a28177dd3808f7d08cee9
treebb625a963c71d09d0dc402867c8f315a3df0277f
parent0b741b1ee4005a68aee76616642a91ba85042f05
Fix incorrect recv() size calculation in libkrad

Before this patch libkrad would always subtract the existing buffer
length from pktlen before passing it to recv().  In the case of stream
sockets, this is incorrect since krad_packet_bytes_needed() already
performs this calculation.  Subtracting the buffer length twice could
cause integer underflow on the len parameter to recv().

ticket: 8430 (new)
target_version: 1.14-next
target_version: 1.13-next
tags: pullup
src/lib/krad/remote.c