Problem: Warning from Covscan about using NULL pointer.
Solution: Add extra check for NULL. (zdohnal)
* Decrypt the read bytes. This is done before checking for
* EOF because the crypt layer may be buffering.
*/
- if (cryptkey != NULL && size > 0)
+ if (cryptkey != NULL && curbuf->b_cryptstate != NULL
+ && size > 0)
{
if (crypt_works_inplace(curbuf->b_cryptstate))
{
static int
undo_flush(bufinfo_T *bi)
{
- if (bi->bi_buffer != NULL && bi->bi_used > 0)
+ if (bi->bi_buffer != NULL && bi->bi_state != NULL && bi->bi_used > 0)
{
crypt_encode_inplace(bi->bi_state, bi->bi_buffer, bi->bi_used);
if (fwrite(bi->bi_buffer, bi->bi_used, (size_t)1, bi->bi_fp) != 1)
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 988,
/**/
987,
/**/