PVS-StudioWarnings

PVS-Studio warning V666 for OpenSSL

Nov 18th, 2014
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.73 KB | None | 0 0
  1. BIO_write(bp,"Error in encoding\n",18)
  2. BIO_write(bp,"\n",1)
  3. BIO_write(bp,":",1)
  4. BIO_write(bp,":BAD OBJECT",11)
  5. BIO_write(bp,"Bad boolean\n",12)
  6.  
  7. static int asn1_parse2(....)
  8. {
  9.   ....
  10.   if (BIO_write(bp,"BAD ENUMERATED",11) <= 0)
  11.     goto end;
  12.   ....
  13. }
  14.  
  15. This suspicious code was found in OpenSSL project by PVS-Studio static code analyzer.
  16. Warning message is:
  17. V666 Consider inspecting third argument of the function 'BIO_write'. It is possible that the value does not correspond with the length of a string which was passed with the second argument. asn1_par.c 378
  18.  
  19. PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment