Remove redundant length check.

This commit is contained in:
Cy Schubert 2009-08-28 20:02:01 +00:00
parent 8c4016c083
commit dff989f0d4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=240469
4 changed files with 2 additions and 24 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= krb5
PORTVERSION= 1.6.3
PORTREVISION= 6
PORTREVISION= 7
CATEGORIES= security
MASTER_SITES= http://web.mit.edu/kerberos/dist/krb5/${PORTVERSION:C/^[0-9]*\.[0-9]*/&X/:C/X\.[0-9]*$//:C/X//}/
PATCH_SITES= http://web.mit.edu/kerberos/advisories/

View file

@ -15,14 +15,3 @@
addrlen = sizeof (his_addr);
if (getpeername(0, (struct sockaddr *)&his_addr, &addrlen) < 0) {
@@ -2312,6 +2318,10 @@
if ((length = krb_mk_safe((u_char *)&cksum, out_buf, sizeof(cksum),
&kdata.session,&ctrl_addr, &his_addr)) == -1) {
secure_error("ADAT: krb_mk_safe failed");
+ return(0);
+ }
+ if (length >= (FTP_BUFSIZ - sizeof("ADAT=")) / 4 * 3) {
+ secure_error("ADAT: reply too long");
return(0);
}
if (length >= (FTP_BUFSIZ - sizeof("ADAT=")) / 4 * 3) {

View file

@ -7,7 +7,7 @@
PORTNAME= krb5
PORTVERSION= 1.6.3
PORTREVISION= 6
PORTREVISION= 7
CATEGORIES= security
MASTER_SITES= http://web.mit.edu/kerberos/dist/krb5/${PORTVERSION:C/^[0-9]*\.[0-9]*/&X/:C/X\.[0-9]*$//:C/X//}/
PATCH_SITES= http://web.mit.edu/kerberos/advisories/

View file

@ -15,14 +15,3 @@
addrlen = sizeof (his_addr);
if (getpeername(0, (struct sockaddr *)&his_addr, &addrlen) < 0) {
@@ -2312,6 +2318,10 @@
if ((length = krb_mk_safe((u_char *)&cksum, out_buf, sizeof(cksum),
&kdata.session,&ctrl_addr, &his_addr)) == -1) {
secure_error("ADAT: krb_mk_safe failed");
+ return(0);
+ }
+ if (length >= (FTP_BUFSIZ - sizeof("ADAT=")) / 4 * 3) {
+ secure_error("ADAT: reply too long");
return(0);
}
if (length >= (FTP_BUFSIZ - sizeof("ADAT=")) / 4 * 3) {