{"id":213423,"date":"2014-02-21T11:33:03","date_gmt":"2014-02-21T07:33:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=213423"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=213423","title":{"rendered":"<span class=\"post_title\">\u041f\u043e\u0431\u043e\u0447\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442: \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c Firebird \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/cc0\/e8b\/bdb\/cc0e8bbdb7c4dcd2357dd6a3cc5d4e04.png\" alt=\"Firebird and PVS-Studio\" align=\"left\"\/> <br \/>  \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0437\u0430\u043d\u044f\u0442\u044b \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439. \u041c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432 \u043a\u043e\u0434\u0430: CppCat, Cppcheck, PVS-Studio \u0438 Visual Studio 2013 (\u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043a\u043e\u0434\u0430). \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 10 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0438 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0447\u0451\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0434\u0430\u0434\u0443\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0442\u0440\u0443\u0434\u043e\u0451\u043c\u043a\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0438 \u043f\u043e\u043a\u0430 \u043e\u043d\u0430 \u043d\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430. \u041d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u044f\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0443\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d, \u0442\u043e \u043f\u0440\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438. \u0427\u0435\u043c \u044f \u0441\u0435\u0439\u0447\u0430\u0441 \u0438 \u0437\u0430\u0439\u043c\u0443\u0441\u044c. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043f\u0438\u0448\u0443, \u0447\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio \u0432 Firebird.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>Firebird<\/h2>\n<p>  Firebird (FirebirdSQL) \u2014 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u0430\u044f, \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u0430\u044f, \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u0430\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0421\u0423\u0411\u0414), \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0430\u044f \u043d\u0430 Linux, Microsoft Windows \u0438 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0445 Unix \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430\u0445.<\/p>\n<p>  \u0421\u0430\u0439\u0442: <a href=\"http:\/\/www.firebirdsql.org\/\">http:\/\/www.firebirdsql.org\/<\/a><\/p>\n<p>  \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432 Wikipedia: <a href=\"http:\/\/www.viva64.com\/go.php?url=1348\">Firebird<\/a><\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432 \u043a\u043e\u0434\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c <a href=\"http:\/\/www.viva64.com\/ru\/pvs-studio\/\">PVS-Studio<\/a>.<\/p>\n<h2>\u041d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">static const UCHAR* compile(const UCHAR* sdl, sdl_arg* arg) {   SLONG n, count, variable, value, sdl_operator;   ....   switch (op)   {     ....     case isc_sdl_add:       sdl_operator = op_add;     case isc_sdl_subtract:       if (!sdl_operator)         sdl_operator = op_subtract;   ...... }<\/code><\/pre>\n<p>  V614 Uninitialized variable &#8216;sdl_operator&#8217; used. sdl.cpp 404<\/p>\n<p>  \u041c\u043d\u0435 \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 &#8216;break&#8217; \u043c\u0435\u0436\u0434\u0443 \u00abcase isc_sdl_add:\u00bb \u0438 \u00abcase isc_sdl_subtract:\u00bb \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e. \u0417\u0434\u0435\u0441\u044c \u043d\u0435 \u0443\u0447\u0442\u0451\u043d \u0441\u043b\u0443\u0447\u0430\u0439, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u043c \u0432 \u00abcase isc_sdl_subtract:\u00bb. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0451\u0442, \u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f &#8216;sdl_operator&#8217; \u0435\u0449\u0451 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430.<\/p>\n<p>  \u0414\u0440\u0443\u0433\u0430\u044f \u0441\u0445\u043e\u0436\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f &#8216;fieldNode&#8217; \u043c\u043e\u0436\u0435\u0442 \u043e\u0441\u0442\u0430\u0442\u044c\u0441\u044f \u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439, \u0435\u0441\u043b\u0438 \u00abfield == false\u00bb.  <\/p>\n<pre><code class=\"cpp\">void blb::move(....) {   ....   const FieldNode* fieldNode;   if (field)   {     if ((fieldNode = ExprNode::as&lt;FieldNode&gt;(field)))     ....   }   ....   const USHORT id = fieldNode-&gt;fieldId;   .... }<\/code><\/pre>\n<p>  V614 Potentially uninitialized pointer &#8216;fieldNode&#8217; used. blb.cpp 1043<\/p>\n<p>  \u0412\u043e\u0442 \u043f\u043e\u0447\u0435\u043c\u0443 \u043f\u043b\u043e\u0445\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u043e\u0434\u043d\u043e \u0438 \u0442\u043e \u0436\u0435 \u0438\u043c\u044f:  <\/p>\n<pre><code class=\"cpp\">void realign(....) {   for (....)   {     UCHAR* p = buffer + field-&gt;fld_offset;     ....     for (const burp_fld* field = relation-&gt;rel_fields;          field; field = field-&gt;fld_next)     {       ....       UCHAR* p = buffer + FB_ALIGN(p - buffer, sizeof(SSHORT));   ........ }<\/code><\/pre>\n<p>  V573 Uninitialized variable &#8216;p&#8217; was used. The variable was used to initialize itself. restore.cpp 17535<\/p>\n<p>  \u041f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 &#8216;p&#8217; \u0445\u043e\u0442\u0435\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 &#8216;p&#8217;. \u0410 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0442\u043e\u0440\u0430\u044f, \u0435\u0449\u0451 \u043d\u0435\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f.<\/p>\n<p>  \u0414\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0435\u0449\u0451 \u0441\u044e\u0434\u0430: restore.cpp 17536<\/p>\n<h2>\u041e\u043f\u0430\u0441\u043d\u043e\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a (\u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c)<\/h2>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 memcmp() \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0442\u0438\u043f\u0430 &#8216;SSHORT&#8217;. &#8216;SSHORT&#8217; \u044d\u0442\u043e \u043d\u0435 \u0447\u0442\u043e \u0438\u043d\u043e\u0435, \u043a\u0430\u043a \u0441\u0438\u043d\u043e\u043d\u0438\u043c \u0442\u0438\u043f\u0430 &#8216;short&#8217;.  <\/p>\n<pre><code class=\"cpp\">SSHORT TextType::compare(   ULONG len1, const UCHAR* str1, ULONG len2, const UCHAR* str2) {   ....   SSHORT cmp = memcmp(str1, str2, MIN(len1, len2));    if (cmp == 0)     cmp = (len1 &lt; len2 ? -1 : (len1 &gt; len2 ? 1 : 0));    return cmp; }<\/code><\/pre>\n<p>  V642 Saving the &#8216;memcmp&#8217; function result inside the &#8216;short&#8217; type variable is inappropriate. The significant bits could be lost breaking the program&#8217;s logic. texttype.cpp 338<\/p>\n<p>  \u0412\u044b \u043d\u0435\u0434\u043e\u0443\u043c\u0435\u0432\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u0442\u0430\u043a?<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f memcmp() \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 &#8216;int&#8217;. \u041d\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0442\u0438\u043f\u0430 &#8216;short&#8217;. \u041f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0442\u0435\u0440\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0441\u0442\u0430\u0440\u0448\u0438\u0445 \u0431\u0438\u0442. \u042d\u0442\u043e \u043e\u043f\u0430\u0441\u043d\u043e!<\/p>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f: \u043c\u0435\u043d\u044c\u0448\u0435 \u043d\u0443\u043b\u044f, \u043d\u043e\u043b\u044c \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0443\u043b\u044f. \u041f\u043e\u0434 \u00ab\u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0443\u043b\u044f\u00bb \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u0442\u044c\u0441\u044f \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c 1, 2 \u0438\u043b\u0438 19472341. \u041d\u0435\u043b\u044c\u0437\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0438 memcmp() \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0435\u043c \u0440\u0430\u0437\u043c\u0435\u0440 \u0442\u0438\u043f\u0430 &#8216;int&#8217;.<\/p>\n<p>  \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u0434\u0443\u043c\u0430\u043d\u043d\u043e\u0439. \u041d\u043e \u044d\u0442\u043e \u0441\u0430\u043c\u0430\u044f \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438. \u0418\u043c\u0435\u043d\u043d\u043e \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c\u044e \u0431\u044b\u043b\u0430 \u043f\u0440\u0438\u0437\u043d\u0430\u043d\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043a\u043e\u0434\u0435 MySQL: <a href=\"http:\/\/www.viva64.com\/go.php?url=1004\">Security vulnerability in MySQL\/MariaDB sql\/password.c<\/a>. \u0422\u0430\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u043c\u0435\u0449\u0430\u043b\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0442\u0438\u043f\u0430 &#8216;char&#8217;. \u0422\u0438\u043f &#8216;short&#8217; \u0441 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043d\u0435 \u0441\u0438\u043b\u044c\u043d\u043e \u043b\u0443\u0447\u0448\u0435.<\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u043e\u043f\u0430\u0441\u043d\u044b\u0435 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0437\u0434\u0435\u0441\u044c:<\/p>\n<ul>\n<li>cvt2.cpp 256<\/li>\n<li>cvt2.cpp 522<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u041e\u043f\u0435\u0447\u0430\u0442\u043a\u0438<\/h2>\n<p>  \u041e\u043f\u0435\u0447\u0430\u0442\u043a\u0438 \u0435\u0441\u0442\u044c \u0432\u0435\u0437\u0434\u0435 \u0438 \u0432\u0441\u0435\u0433\u0434\u0430. \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0438\u0437 \u043d\u0438\u0445 \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u043e \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e, \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432 \u043b\u044e\u0431\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435.  <\/p>\n<pre><code class=\"cpp\">int Parser::parseAux() {   ....   if (yyps-&gt;errflag != yyps-&gt;errflag) goto yyerrlab;   .... }<\/code><\/pre>\n<p>  V501 There are identical sub-expressions to the left and to the right of the &#8216;!=&#8217; operator: yyps-&gt;errflag != yyps-&gt;errflag parse.cpp 23523<\/p>\n<p>  \u0414\u0443\u043c\u0430\u044e, \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0437\u0434\u0435\u0441\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u044b. \u0410 \u0432\u043e\u0442 \u0437\u0434\u0435\u0441\u044c, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f Copy-Paste:  <\/p>\n<pre><code class=\"cpp\">bool CMP_node_match( const qli_nod* node1, const qli_nod* node2) {   ....   if (node1-&gt;nod_desc.dsc_dtype != node2-&gt;nod_desc.dsc_dtype ||       node2-&gt;nod_desc.dsc_scale != node2-&gt;nod_desc.dsc_scale ||       node2-&gt;nod_desc.dsc_length != node2-&gt;nod_desc.dsc_length)   .... }<\/code><\/pre>\n<p>  V501 There are identical sub-expressions &#8216;node2-&gt;nod_desc.dsc_scale&#8217; to the left and to the right of the &#8216;!=&#8217; operator. compile.cpp 156<\/p>\n<p>  V501 There are identical sub-expressions &#8216;node2-&gt;nod_desc.dsc_length&#8217; to the left and to the right of the &#8216;!=&#8217; operator. compile.cpp 157<\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 CMP_node_match() \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0447\u043b\u0435\u043d\u044b \u043a\u043b\u0430\u0441\u0441\u0430 &#8216;nod_desc.dsc_scale&#8217; \u0438 &#8216;nod_desc.dsc_length&#8217;.<\/p>\n<p>  \u0415\u0449\u0451 \u043e\u0434\u043d\u0430 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0443 \u0430\u0432\u0442\u043e\u0440\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0437\u0434\u0435\u0441\u044c: compile.cpp 183<\/p>\n<h2>\u0421\u0442\u0440\u0430\u043d\u043d\u044b\u0435 \u0446\u0438\u043a\u043b\u044b<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">static processing_state add_row(TEXT* tabname) {   ....   unsigned i = n_cols;   while (--i &gt;= 0)   {     if (colnumber[i] == ~0u)   {        bldr-&gt;remove(fbStatus, i);        if (ISQL_errmsg(fbStatus))          return (SKIP);     }   }   msg.assignRefNoIncr(bldr-&gt;getMetadata(fbStatus));   .... }<\/code><\/pre>\n<p>  V547 Expression &#8216;&#8212; i &gt;= 0&#8217; is always true. Unsigned type value is always &gt;= 0. isql.cpp 3421<\/p>\n<p>  \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f &#8216;i&#8217; \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f &#8216;unsigned&#8217;. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f &#8216;i&#8217; \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043b\u0438 \u0440\u0430\u0432\u043d\u043e 0. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 (&#8212;i &gt;= 0) \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430. \u041e\u043d\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u0442\u0438\u043d\u043d\u043e.<\/p>\n<p>  \u042d\u0442\u043e\u0442 \u0446\u0438\u043a\u043b \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u0441\u044f \u0440\u0430\u043d\u044c\u0448\u0435, \u0447\u0435\u043c \u043d\u0443\u0436\u043d\u043e:  <\/p>\n<pre><code class=\"cpp\">SLONG LockManager::queryData(....) {   ....   for (const srq* lock_srq = (SRQ)           SRQ_ABS_PTR(data_header.srq_backward);      lock_srq != &amp;data_header;      lock_srq = (SRQ) SRQ_ABS_PTR(lock_srq-&gt;srq_backward))   {     const lbl* const lock = ....;     CHECK(lock-&gt;lbl_series == series);     data = lock-&gt;lbl_data;     break;   }   .... }<\/code><\/pre>\n<p>  \u0427\u0442\u043e \u044d\u0442\u043e \u0437\u0430 \u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 &#8216;braeak&#8217;?<\/p>\n<p>  \u0415\u0449\u0451 \u043e\u0434\u043d\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0437\u0434\u0435\u0441\u044c: pag.cpp 217<\/p>\n<h2>\u041a\u043b\u0430\u0441\u0441\u0438\u043a\u0430<\/h2>\n<p>  \u041a\u0430\u043a \u0432\u0441\u0435\u0433\u0434\u0430, \u043c\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043d\u0435\u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043e\u043a, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f\u043c\u0438. \u0412 \u043d\u0430\u0447\u0430\u043b\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e \u043d\u0443\u043b\u044e. \u0414\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043e\u0448\u0438\u0431\u043a\u0435, \u043e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u043f\u043b\u043e\u0445\u043e\u0439 \u0438 \u043e\u043f\u0430\u0441\u043d\u044b\u0439 \u043a\u043e\u0434. \u041f\u043e\u043a\u0430\u0436\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043f\u0440\u0438\u043c\u0435\u0440. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044e \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0441\u043f\u0438\u0441\u043a\u0435.  <\/p>\n<pre><code class=\"cpp\">int CCH_down_grade_dbb(void* ast_object) {   ....   SyncLockGuard bcbSync(     &amp;bcb-&gt;bcb_syncObject, SYNC_EXCLUSIVE, &quot;CCH_down_grade_dbb&quot;);   bcb-&gt;bcb_flags &amp;= ~BCB_exclusive;    if (bcb &amp;&amp; bcb-&gt;bcb_count)   .... }<\/code><\/pre>\n<p>  V595 The &#8216;bcb&#8217; pointer was utilized before it was verified against nullptr. Check lines: 271, 274. cch.cpp 271<\/p>\n<p>  \u0412 \u043d\u0430\u0447\u0430\u043b\u0435, \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c &#8216;bcb&#8217; \u0440\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0438 \u00abbcb-&gt;bcb_flags &amp;= &#8230;.\u00bb. \u0418\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e &#8216;bcb&#8217; \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0440\u0430\u0432\u0435\u043d \u043d\u0443\u043b\u044e.<\/p>\n<p>  \u0421\u043f\u0438\u0441\u043e\u043a \u0442\u0430\u043a\u0438\u0445 \u043c\u0435\u0441\u0442 (31 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435): <a href=\"http:\/\/www.viva64.com\/external-pictures\/txt\/firebird-V595.txt\">firebird-V595.txt<\/a><\/p>\n<h2>Shift operators<\/h2>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a Firebird \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430\u043c\u0438 \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b, \u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0441\u0434\u0432\u0438\u0433\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u043a \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u043c\u0443 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044e. \u041e\u043d\u0438 \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u043e\u044f\u0432\u0438\u0442\u044c \u0441\u0435\u0431\u044f \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.  <\/p>\n<pre><code class=\"cpp\">const ULONG END_BUCKET = (~0) &lt;&lt; 1;<\/code><\/pre>\n<p>  V610 Undefined behavior. Check the shift operator &#8216;&lt;&lt;. The left operand &#8216;(~0)&#8217; is negative. ods.h 337<\/p>\n<p>  \u041d\u0435\u043b\u044c\u0437\u044f \u0441\u0434\u0432\u0438\u0433\u0430\u0442\u044c \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0447\u0438\u0441\u043b\u0430. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435: &quot;<a href=\"http:\/\/www.viva64.com\/ru\/b\/0142\/\">\u041d\u0435 \u0437\u043d\u0430\u044f \u0431\u0440\u043e\u0434\u0430, \u043d\u0435 \u043b\u0435\u0437\u044c \u0432 \u0432\u043e\u0434\u0443. \u0427\u0430\u0441\u0442\u044c \u0442\u0440\u0435\u0442\u044c\u044f<\/a>&quot;.<\/p>\n<p>  \u0417\u0434\u0435\u0441\u044c \u043b\u0443\u0447\u0448\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"cpp\">const ULONG END_BUCKET = (~0u) &lt;&lt; 1;<\/code><\/pre>\n<p>  \u0418 \u0435\u0449\u0451 \u0434\u0432\u0430 \u043f\u043b\u043e\u0445\u0438\u0445 \u0441\u0434\u0432\u0438\u0433\u0430:<\/p>\n<ul>\n<li>exprnodes.cpp 6185<\/li>\n<li>array.cpp 845<\/li>\n<\/ul>\n<p>  <\/p>\n<h2>\u0411\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">static processing_state add_row(TEXT* tabname) {   ....   unsigned varLength, scale;   ....   scale = msg-&gt;getScale(fbStatus, i);   ....   if (scale &lt; 0)   .... }<\/code><\/pre>\n<p>  V547 Expression &#8216;scale &lt; 0&#8217; is always false. Unsigned type value is never &lt; 0. isql.cpp 3716<\/p>\n<p>  \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f &#8216;scale&#8217; \u0438\u043c\u0435\u0435\u0442 \u0442\u0438\u043f &#8216;unsigned&#8217;. \u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 (scale &lt; 0) \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430.<\/p>\n<p>  \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e: isql.cpp 4437<\/p>\n<p>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0434\u0440\u0443\u0433\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e:  <\/p>\n<pre><code class=\"cpp\">static bool get_switches(....)   ....   if (**argv != 'n' || **argv != 'N')   {     fprintf(stderr, &quot;-sqlda :  &quot;             &quot;Deprecated Feature: you must use XSQLDA\\n &quot;);     print_switches();     return false;   }   .... }<\/code><\/pre>\n<p>  \u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438. \u0423\u0441\u043b\u043e\u0432\u0438\u0435 (**argv != &#8216;n&#8217; || **argv != &#8216;N&#8217;) \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u0441\u0435\u0433\u0434\u0430.<\/p>\n<h2>\u0420\u0430\u0437\u043d\u043e\u0435<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">void FB_CARG Why::UtlInterface::getPerfCounters(   ...., ISC_INT64* counters) {   unsigned n = 0;   ....   memset(counters, 0, n * sizeof(ISC_INT64));   .... }<\/code><\/pre>\n<p>  V575 The &#8216;memset&#8217; function processes &#8216;0&#8217; elements. Inspect the third argument. perf.cpp 487<\/p>\n<p>  \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 &#8216;n&#8217; \u0432 \u0442\u0435\u043b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0437\u0430\u0431\u044b\u043b\u0438 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0435 \u043e\u0442 \u043d\u0443\u043b\u044f.<\/p>\n<p>  \u0424\u0443\u043d\u043a\u0446\u0438\u044f convert() \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0440\u0435\u0442\u044c\u0435\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0434\u043b\u0438\u043d\u0443 \u0441\u0442\u0440\u043e\u043a\u0438:  <\/p>\n<pre><code class=\"cpp\">ULONG convert(const ULONG srcLen,               const UCHAR* src,               const ULONG dstLen,               UCHAR* dst,               ULONG* badInputPos = NULL,               bool ignoreTrailingSpaces = false);<\/code><\/pre>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e:  <\/p>\n<pre><code class=\"cpp\">string IntlUtil::escapeAttribute(....) {   ....   ULONG l;   UCHAR* uc = (UCHAR*)(&amp;l);   const ULONG uSize =     cs-&gt;getConvToUnicode().convert(size, p, sizeof(uc), uc);   .... }<\/code><\/pre>\n<p>  V579 The convert function receives the pointer and its size as arguments. It is possibly a mistake. Inspect the third argument. intlutil.cpp 668<\/p>\n<p>  \u041c\u044b \u0438\u043c\u0435\u0435\u043c \u0434\u0435\u043b\u043e \u0441 <a href=\"http:\/\/www.viva64.com\/ru\/t\/0002\/\">64-\u0431\u0438\u0442\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u043e\u0439<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u044f\u0432\u0438\u0442 \u0441\u0435\u0431\u044f \u0432 Win64.<\/p>\n<p>  \u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 &#8216;sizeof(uc)&#8217; \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f, \u0430 \u043d\u0435 \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0443\u0444\u0435\u0440\u0430. \u042d\u0442\u043e \u043d\u0435 \u0441\u0442\u0440\u0430\u0448\u043d\u043e, \u0435\u0441\u043b\u0438 \u0440\u0430\u0437\u043c\u0435\u0440 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0442\u0438\u043f\u0430 &#8216;unsigned long&#8217;. \u0420\u0430\u0437\u043c\u0435\u0440 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u0442\u0438\u043f\u0430 &#8216;long&#8217;, \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u0443\u0435\u043c \u0434\u043b\u044f Linux. \u041d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0438 \u0432 Win32.<\/p>\n<p>  \u041e\u0448\u0438\u0431\u043a\u0430 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f Win64. \u0424\u0443\u043d\u043a\u0446\u0438\u044f convert() \u0431\u0443\u0434\u0435\u0442 \u0434\u0443\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0443\u0444\u0435\u0440\u0430 \u0440\u0430\u0432\u0435\u043d 8 \u0431\u0430\u0439\u0442 (\u0440\u0430\u0437\u043c\u0435\u0440 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f). \u0410 \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u0443\u0444\u0435\u0440\u0430 \u0440\u0430\u0432\u0435\u043d 4 \u0431\u0430\u0439\u0442\u0430\u043c.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0435\u0441\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 64-\u0431\u0438\u0442\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. \u041d\u043e \u044f \u043d\u0435 \u0438\u0437\u0443\u0447\u0430\u043b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438. \u041f\u0440\u043e \u043d\u0438\u0445 \u0441\u043a\u0443\u0447\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0438 \u043d\u0435 \u0437\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u0442\u0440\u0443\u0434\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0431\u0443\u0434\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u0438\u043b\u0438 \u043d\u0435\u0442. \u041e\u043f\u0438\u0441\u0430\u043d\u043d\u0430\u044f 64-\u0431\u0438\u0442\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u043a\u043e\u0441\u0432\u0435\u043d\u043d\u043e, \u043f\u0440\u0438 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0438 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439 \u043e\u0431\u0449\u0435\u0433\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0427\u0438\u0442\u0430\u0442\u0435\u043b\u044e, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c, \u0447\u0442\u043e \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0432 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Cppcheck \u0438 VS2013. \u0414\u0430, \u044d\u0442\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u043d\u0430\u0448\u043b\u0438 \u043a\u043e\u0435-\u0447\u0442\u043e, \u0447\u0442\u043e \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c PVS-Studio. \u041d\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e. \u041d\u0430 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 PVS-Studio \u043f\u043e\u043a\u0430\u0437\u0430\u043b \u0441\u0435\u0431\u044f \u043b\u0438\u0434\u0435\u0440\u043e\u043c. \u0411\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0439\u0442\u0438 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0443\u0436\u0435 \u0441\u043a\u043e\u0440\u043e \u043d\u0430\u0447\u043d\u0451\u043c \u043f\u0438\u0441\u0430\u0442\u044c.<\/p>\n<p>  \u0415\u0449\u0451 \u0445\u043e\u0447\u0443 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0432\u0441\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 <a href=\"http:\/\/www.cppcat.com\">CppCat<\/a>. \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio \u0432\u044b\u0434\u0430\u0451\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0439, \u0435\u0441\u043b\u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c 3 \u0443\u0440\u043e\u0432\u0435\u043d\u044c, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 64-\u0431\u0438\u0442\u043d\u044b\u0435 \u0434\u0438\u0430\u0433\u043d\u043e\u0441\u0442\u0438\u043a\u0438 \u0438 <a href=\"http:\/\/www.viva64.com\/ru\/b\/0228\/\">\u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435<\/a>. \u041d\u043e \u0435\u0449\u0451 \u0440\u0430\u0437 \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443, \u0447\u0442\u043e \u044d\u0442\u0443 \u0441\u0442\u0430\u0442\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u0435 PVS-Studio, \u0430 CppCat. CppCat \u2014 \u0445\u043e\u0440\u043e\u0448\u0435\u0435 \u043d\u0430\u0447\u0430\u043b\u043e \u043f\u043e \u0435\u0436\u0435\u0434\u043d\u0435\u0432\u043d\u043e\u043c\u0443 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044e \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0434\u0430.    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/company\/pvs-studio\/blog\/213423\/\"> http:\/\/habrahabr.ru\/company\/pvs-studio\/blog\/213423\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/cc0\/e8b\/bdb\/cc0e8bbdb7c4dcd2357dd6a3cc5d4e04.png\" alt=\"Firebird and PVS-Studio\" align=\"left\"\/> <br \/>  \u0421\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0437\u0430\u043d\u044f\u0442\u044b \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439. \u041c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0447\u0435\u0442\u044b\u0440\u0451\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432 \u043a\u043e\u0434\u0430: CppCat, Cppcheck, PVS-Studio \u0438 Visual Studio 2013 (\u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043a\u043e\u0434\u0430). \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0440\u0435\u0448\u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 10 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0438 \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0447\u0451\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0434\u0430\u0434\u0443\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0442\u0440\u0443\u0434\u043e\u0451\u043c\u043a\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0438 \u043f\u043e\u043a\u0430 \u043e\u043d\u0430 \u043d\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430. \u041d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u0440\u044f\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0443\u0436\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d, \u0442\u043e \u043f\u0440\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438. \u0427\u0435\u043c \u044f \u0441\u0435\u0439\u0447\u0430\u0441 \u0438 \u0437\u0430\u0439\u043c\u0443\u0441\u044c. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043f\u0438\u0448\u0443, \u0447\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio \u0432 Firebird.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-213423","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/213423","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=213423"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/213423\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=213423"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=213423"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=213423"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}