mirror of
https://github.com/facebook/zstd.git
synced 2025-07-30 22:23:13 +03:00
Add NULL check for dict
This commit is contained in:
@ -1298,8 +1298,8 @@ FIO_compressFilename_srcFile(FIO_prefs_t* const prefs,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ensure src is not the same as dict */
|
/* ensure src is not the same as dict (if present) */
|
||||||
if (UTIL_isSameFile(srcFileName, ress.dictFileName)) {
|
if (ress.dictFileName != NULL && UTIL_isSameFile(srcFileName, ress.dictFileName)) {
|
||||||
DISPLAYLEVEL(1, "zstd: cannot use %s as an input file and dictionary \n", srcFileName);
|
DISPLAYLEVEL(1, "zstd: cannot use %s as an input file and dictionary \n", srcFileName);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user