Date: Sat, 23 Apr 2005 12:07:18 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 75796 for review Message-ID: <200504231207.j3NC7Ipa064742@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=75796 Change 75796 by rwatson@rwatson_paprika on 2005/04/23 12:06:24 Merge removal of bogus checks for nul-termination from FreeBSD to OpenBSM. Affected files ... .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#3 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#3 (text+ko) ==== @@ -74,12 +74,7 @@ return NULL; } - /* Make sure that text is null terminated */ textlen = strlen(text); - if(text[textlen] != '\0') { - return NULL; - } - GET_TOKEN_AREA(t, dptr, 9 + textlen); if(t == NULL) { return NULL; @@ -107,12 +102,7 @@ return NULL; } - /* Make sure that text is null terminated */ textlen = strlen(text); - if(text[textlen] != '\0') { - return NULL; - } - GET_TOKEN_AREA(t, dptr, 13 + textlen); if(t == NULL) { return NULL; @@ -537,12 +527,7 @@ if(file == NULL) { return NULL; } - /* Make sure that text is null terminated */ filelen = strlen(file); - if(file[filelen] != '\0') { - return NULL; - } - GET_TOKEN_AREA(t, dptr, filelen + 12); if(t == NULL) { return NULL; @@ -576,12 +561,7 @@ if(text == NULL) { return NULL; } - /* Make sure that text is null terminated */ textlen = strlen(text); - if(text[textlen] != '\0') { - return NULL; - } - GET_TOKEN_AREA(t, dptr, textlen + 4); if(t == NULL) { return NULL; @@ -610,12 +590,7 @@ if(text == NULL) { return NULL; } - /* Make sure that text is null terminated */ textlen = strlen(text); - if(text[textlen] != '\0') { - return NULL; - } - GET_TOKEN_AREA(t, dptr, textlen + 4); if(t == NULL) { return NULL; @@ -1087,10 +1062,6 @@ int nextlen; nextlen = strlen(nextarg); - if(nextarg[nextlen] != '\0') { - return NULL; - } - totlen += nextlen + 1; count++; nextarg = *(args + count); @@ -1137,10 +1108,6 @@ int nextlen; nextlen = strlen(nextenv); - if(nextenv[nextlen] != '\0') { - return NULL; - } - totlen += nextlen + 1; count++; nextenv = *(env + count);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200504231207.j3NC7Ipa064742>