mirror of
https://github.com/xorgy/mediafire-fuse
synced 2026-01-13 21:24:28 -08:00
mfconn_create: abort early on faulty input
This commit is contained in:
@@ -42,6 +42,18 @@ mfconn *mfconn_create(const char *server, const char *username,
|
|||||||
mfconn *conn;
|
mfconn *conn;
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
|
if (server == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (username == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (password == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (app_id < 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
conn = (mfconn *) calloc(1, sizeof(mfconn));
|
conn = (mfconn *) calloc(1, sizeof(mfconn));
|
||||||
|
|
||||||
conn->server = strdup(server);
|
conn->server = strdup(server);
|
||||||
|
|||||||
Reference in New Issue
Block a user