Changeset 55 for trunk/src/sh_suidchk.c
- Timestamp:
- Aug 17, 2006, 10:31:24 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_suidchk.c
r34 r55 519 519 if (/*@-usedef@*/S_ISDIR(buf.st_mode)/*@+usedef@*/ && 520 520 (ShSuidchkExclude == NULL || 521 0 != strncmp(tmpcat, ShSuidchkExclude, (size_t) ExcludeLen)))521 0 != strcmp(tmpcat, ShSuidchkExclude))) 522 522 { 523 523 /* fs is a STATIC string … … 1118 1118 SH_FREE(ShSuidchkExclude); 1119 1119 1120 /* 1.8.1 add trailing slash1121 */1122 1120 ExcludeLen = (int) sl_strlen(c); 1123 if (c[ExcludeLen-1] != '/') 1124 { 1125 ExcludeLen++; 1126 if ((ExcludeLen <= 0) || (ExcludeLen+1 <= 0)) /* may overflow */ 1127 { 1128 SL_RETURN(-1, _("sh_suidchk_set_exclude")); 1129 } 1121 if (c[ExcludeLen-1] == '/') 1122 { 1123 c[ExcludeLen-1] = '\0'; 1124 ExcludeLen--; 1130 1125 } 1131 1126 ShSuidchkExclude = SH_ALLOC((size_t) ExcludeLen + 1); 1132 1127 (void) sl_strlcpy(ShSuidchkExclude, c, (size_t)(ExcludeLen + 1)); 1133 ShSuidchkExclude[ExcludeLen-1] = '/';1134 1128 1135 1129 SL_RETURN(0, _("sh_suidchk_set_exclude"));
Note:
See TracChangeset
for help on using the changeset viewer.