projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6fc1515
)
Pointer "cur_pos" dereferenced before NULL check, found by coverity.com scan.
author
Daniel Stenberg
<daniel@haxx.se>
Fri, 30 Mar 2007 20:52:42 +0000
(20:52 +0000)
committer
Daniel Stenberg
<daniel@haxx.se>
Fri, 30 Mar 2007 20:52:42 +0000
(20:52 +0000)
Removed the NULL check since the pointer must be valid already.
lib/ftp.c
patch
|
blob
|
history
diff --git
a/lib/ftp.c
b/lib/ftp.c
index
4fe25dc
..
eb92a67
100644
(file)
--- a/
lib/ftp.c
+++ b/
lib/ftp.c
@@
-3674,7
+3674,7
@@
CURLcode ftp_parse_url_path(struct connectdata *conn)
case FTPFILE_SINGLECWD:
/* get the last slash */
slash_pos=strrchr(cur_pos, '/');
- if(slash_pos || !
cur_pos || !
*cur_pos) {
+ if(slash_pos || !*cur_pos) {
ftpc->dirdepth = 1; /* we consider it to be a single dir */
ftpc->dirs = (char **)calloc(1, sizeof(ftpc->dirs[0]));
if(!ftpc->dirs)