... | ... |
@@ -166,7 +166,7 @@ static int send_stream(int sockd, const char *filename) { |
166 | 166 |
unsigned long int todo = maxstream; |
167 | 167 |
|
168 | 168 |
if(filename) { |
169 |
- if((fd = open(filename, O_RDONLY | O_BINARY))<0) { |
|
169 |
+ if((fd = safe_open(filename, O_RDONLY | O_BINARY))<0) { |
|
170 | 170 |
logg("~%s: Access denied. ERROR\n", filename); |
171 | 171 |
return 0; |
172 | 172 |
} |
... | ... |
@@ -2380,7 +2380,7 @@ int cl_scanfile(const char *filename, const char **virname, unsigned long int *s |
2380 | 2380 |
{ |
2381 | 2381 |
int fd, ret; |
2382 | 2382 |
|
2383 |
- if((fd = open(filename, O_RDONLY|O_BINARY)) == -1) |
|
2383 |
+ if((fd = safe_open(filename, O_RDONLY|O_BINARY)) == -1) |
|
2384 | 2384 |
return CL_EOPEN; |
2385 | 2385 |
|
2386 | 2386 |
ret = cl_scandesc(fd, virname, scanned, engine, scanoptions); |