pqc-thunderbird / libgcrypt

GNU General Public License v2.0
1 stars 0 forks source link

-fanalyzer warning mlkem polyvec check for null after deref #62

Closed falko-strenzke closed 6 months ago

falko-strenzke commented 6 months ago
cipher/mlkem-polyvec.c|35 col 6| warning: check of ‘polymat’ for NULL after already dereferencing it [-Wanalyzer-deref-before-check]
||    35 |   if (!polymat)
||       |      ^
||   ‘_gcry_mlkem_polymatrix_create’: events 1-2
||     |
||     |   34 |   *polymat = xtrymalloc (sizeof (**polymat) * param->k);
||     |   35 |   if (!polymat)
||     |      |      ~      
||     |      |      |
||     |      |      (2) pointer ‘polymat’ is checked for NULL here but it was already dereferenced at (1)
||     |