[Asterisk-code-review] file.c/ ast file read dirs: Truncate path after calling stat (asterisk[master])

George Joseph asteriskteam at digium.com
Tue Nov 15 18:52:22 CST 2016


George Joseph has posted comments on this change. ( https://gerrit.asterisk.org/4447 )

Change subject: file.c/__ast_file_read_dirs:  Truncate path after calling stat
......................................................................


Patch Set 3:

(1 comment)

https://gerrit.asterisk.org/#/c/4447/3/main/file.c
File main/file.c:

PS3, Line 1145: 			if (stat(ast_str_buffer(*path), &statbuf)) {
              : 				ast_log(LOG_ERROR, "Error reading path stats - %s: %s\n",
              : 					ast_str_buffer(*path), strerror(errno));
              : 				/*
              : 				 * Output an error, but keep going. It could just be
              : 				 * a broken link and other files could be fine.
              : 				 */
              : 				continue;
              : 			}
> If this off nominal path gets triggered then 'path' has the d_name attached
Well, teh stat function requirement won't change while traversing a directory because the filesystem eithe rsupports it or it doesn't and you can't escape the filesystem since we don't follow symlinks.

BUT i take the point.


-- 
To view, visit https://gerrit.asterisk.org/4447
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I54e4228bd8355fad65200c6df3ec4c9c8a98dfba
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list