Diff for /embedaddon/sudo/plugins/sudoers/find_path.c between versions 1.1.1.3 and 1.1.1.4

version 1.1.1.3, 2013/07/22 10:46:12 version 1.1.1.4, 2014/06/15 16:12:54
Line 105  find_path(char *infile, char **outfile, struct stat *s Line 105  find_path(char *infile, char **outfile, struct stat *s
          * Resolve the path and exit the loop if found.           * Resolve the path and exit the loop if found.
          */           */
         len = snprintf(command, sizeof(command), "%s/%s", path, infile);          len = snprintf(command, sizeof(command), "%s/%s", path, infile);
        if (len <= 0 || len >= sizeof(command)) {        if (len <= 0 || (size_t)len >= sizeof(command)) {
             errno = ENAMETOOLONG;              errno = ENAMETOOLONG;
             fatal("%s", infile);              fatal("%s", infile);
         }          }
Line 122  find_path(char *infile, char **outfile, struct stat *s Line 122  find_path(char *infile, char **outfile, struct stat *s
      */       */
     if (!found && checkdot) {      if (!found && checkdot) {
         len = snprintf(command, sizeof(command), "./%s", infile);          len = snprintf(command, sizeof(command), "./%s", infile);
        if (len <= 0 || len >= sizeof(command)) {        if (len <= 0 || (size_t)len >= sizeof(command)) {
             errno = ENAMETOOLONG;              errno = ENAMETOOLONG;
             fatal("%s", infile);              fatal("%s", infile);
         }          }

Removed from v.1.1.1.3  
changed lines
  Added in v.1.1.1.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>