|
|
@@ -655,7 +655,14 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon, loff_t pos,
|
|
|
/* scan and find it */
|
|
|
int i;
|
|
|
char *cur_ent;
|
|
|
- char *end_of_smb = cfile->srch_inf.ntwrk_buf_start +
|
|
|
+ char *end_of_smb;
|
|
|
+
|
|
|
+ if (cfile->srch_inf.ntwrk_buf_start == NULL) {
|
|
|
+ cifs_dbg(VFS, "ntwrk_buf_start is NULL during readdir\n");
|
|
|
+ return -EIO;
|
|
|
+ }
|
|
|
+
|
|
|
+ end_of_smb = cfile->srch_inf.ntwrk_buf_start +
|
|
|
server->ops->calc_smb_size(
|
|
|
cfile->srch_inf.ntwrk_buf_start,
|
|
|
server);
|