On Tue, 12 Oct 2010 23:56:16 +0200 Klaus Schmidinger <Klaus.Schmidinger@xxxxxxx> wrote: > Unless "atinar" or somebody else comes up with a fixed version > of this patch, I'll simply revert to the previous version. find attached the patch. - use lstat - don't check if (n < size) as it should be same I have tested this and its working. Steffen
diff -urNad vdr-1.7.16~/tools.c vdr-1.7.16/tools.c --- vdr-1.7.16~/tools.c 2010-08-29 17:03:08.000000000 +0200 +++ vdr-1.7.16/tools.c 2010-10-14 23:55:22.622829123 +0200 @@ -368,7 +368,7 @@ cString buffer = AddDirectory(FileName, e->d_name); if (FollowSymlinks) { struct stat st2; - if (stat(buffer, &st2) == 0) { + if (lstat(buffer, &st2) == 0) { if (S_ISLNK(st2.st_mode)) { int size = st2.st_size + 1; char *l = MALLOC(char, size); @@ -377,14 +377,12 @@ if (errno != EINVAL) LOG_ERROR_STR(*buffer); } - else if (n < size) { + else { l[n] = 0; dsyslog("removing %s", l); if (remove(l) < 0) LOG_ERROR_STR(l); } - else - esyslog("ERROR: symlink name length (%d) exceeded anticipated buffer size (%d)", n, size); free(l); } }
_______________________________________________ vdr mailing list vdr@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr