commit - f6852d460b7949c591420eadb61ddf8e211c03a6
commit + dd4c419722fe06a0e79fc39e303003908f7feceb
blob - df4695a5b57ce3e383d90c391233f0970172ace7
blob + c7b9dbea6bfeb4a26988cf2367b2492119b8242f
--- lib/repository.c
+++ lib/repository.c
* during import then we have a racy situation no matter what.
*/
pos = telldir(dir);
+ if (pos == -1) {
+ err = got_error_from_errno2("telldir", path_dir);
+ goto done;
+ }
while ((de = readdir(dir)) != NULL) {
if (strcmp(de->d_name, ".") != 0 &&
strcmp(de->d_name, "..") != 0) {
goto done;
}
pos = telldir(dir);
+ if (pos == -1) {
+ err = got_error_from_errno2("telldir", path_dir);
+ goto done;
+ }
}
nentries = 0;