From: Gaurav <gau...@gm...> - 2014-06-10 06:42:46
|
Hi, I'd like to file a bug reported by the clang static analyzer. Description: Access to field 'type' results in a dereference of a null pointer (loaded from variable 'c') File: cipher/cipher.c Line: 395 I think macro 'cipher_encrypt' should check if the pointer 'c' exists. In case it doesn't exist it should return an appropriate error code such as 'err_status_no_such_op'. I think macro 'cipher_encrypt' should expand to: ((c) ? (((c)->type)->encrypt(((c)->state), (enc_buf), (&len))) : err_status_no_such_op) instead of: (((c)->type)->encrypt(((c)->state), (enc_buf), (&len))) -Gaurav Nangla |