{"id":358538,"date":"2024-05-21T00:13:56","date_gmt":"2024-05-21T00:13:56","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=358538"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=358538","title":{"rendered":"<span>\u041e\u043f\u0435\u0447\u0430\u0442\u043a\u0438, \u043d\u0443\u043b\u0435\u0432\u044b\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0438 \u043a\u043e\u0432\u0430\u0440\u043d\u044b\u0439 \u0442\u0430\u0431: 33 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 GTK<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ak\/xh\/g9\/akxhg9ckweg01usq2dysq7gamac.png\" alt=\"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 TAB \u0432 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u043c \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u0435\" data-src=\"https:\/\/habrastorage.org\/webt\/ak\/xh\/g9\/akxhg9ckweg01usq2dysq7gamac.png\"\/><\/p>\n<p>  <\/p>\n<p>GTK \u2013 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio. \u0422\u0435\u043c \u0431\u043e\u043b\u0435\u0435, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u043e\u043a\u043e\u043b\u043e 3 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043d\u0430\u0439\u0434\u0451\u043c \u0432 \u043d\u0451\u043c \u043d\u043e\u0432\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<p>  <\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0438\u0437 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 &#171;<a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/0793\/\">\u0412\u044b\u044f\u0432\u043b\u044f\u0435\u043c \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 GTK 4 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio<\/a>&#171;, \u043d\u043e \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u0432\u0430\u044e, \u0447\u0442\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 GTK. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043a\u0440\u0430\u0442\u0446\u0435: \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430 \u0438 \u0438\u043c\u0435\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 <a href=\"https:\/\/gitlab.gnome.org\/GNOME\/gtk\">\u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434<\/a>, \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434 GNU GPL, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u0432 \u043b\u044e\u0431\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 (\u0434\u0430\u0436\u0435 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u0445).<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"fragment-n1-escape-sequence\">\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N1. Escape sequence<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">gboolean gtk_builder_value_from_string_type (....) {   g_set_error (error,                GTK_BUILDER_ERROR,                GTK_BUILDER_ERROR_INVALID_VALUE,                \"Object named \\\"%s\\\" is of type \\\"%s\\\" which is not compatible \"                \"with expected type \\%s\\\"\",                string, G_OBJECT_TYPE_NAME (object), g_type_name (type)); }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v1094\/\">V1094<\/a> The representation of conditional escape sequence &#8216;\\%&#8217; is implementation-defined. Using this sequence in the string literal can lead to unexpected results. gtkbuilder.c 2674<\/p>\n<p>  <\/p>\n<p>\u0412 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0439 \u043b\u0438\u0442\u0435\u0440\u0430\u043b \u0432\u043a\u0440\u0430\u043b\u0430\u0441\u044c \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430. \u0425\u043e\u0442\u0435\u043b\u0438 \u044d\u043a\u0440\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u043e\u0439\u043d\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">\\\"%s\\\"<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u043b\u0438 \u0441\u0438\u043c\u0432\u043e\u043b \u043a\u0430\u0432\u044b\u0447\u0435\u043a, \u0438 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043d\u0435\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0430\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0430\u044f \u0438\u0437 \u043a\u043e\u0441\u043e\u0439 \u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u043e\u0432:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">\\%s\\\"<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 \u044d\u0442\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u2014 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430.<\/p>\n<p>  <\/p>\n<h2 id=\"fragment-n2-opechatka-v-uslovii\">\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N2. \u041e\u043f\u0435\u0447\u0430\u0442\u043a\u0430 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">Value* op_color_number(enum Sass_OP op, ....) {   double rval = rhs.value();    if ((op == Sass_OP::DIV || op == Sass_OP::DIV) &amp;&amp; rval == 0) {     \/\/ comparison of Fixnum with Float failed?     throw Exception::ZeroDivisionError(lhs, rhs);   }   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v501\/\">V501<\/a> [CWE-570] There are identical sub-expressions to the left and to the right of the &#8216;||&#8217; operator: op == Sass_OP::DIV || op == Sass_OP::DIV operators.cpp 250<\/p>\n<p>  <\/p>\n<p>\u0414\u0432\u0430 \u0440\u0430\u0437\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043e\u0439 <em>Sass_OP::DIV<\/em>. \u0415\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u043e\u0439 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c <em>Sass_OP::MOD<\/em>.<\/p>\n<p>  <\/p>\n<p>\u041e\u0448\u0438\u0431\u043a\u0443 \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u0440\u043e\u0449\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0435\u0441\u043b\u0438 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u044b\u0435 \u0431\u043b\u043e\u043a\u0438 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0441\u0442\u043e\u043b\u0431\u0438\u043a\u043e\u043c. \u0412\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if ((   op == Sass_OP::DIV      || op == Sass_OP::DIV)     &amp;&amp; rval == 0) {   \/\/ comparison of Fixnum with Float failed?   throw Exception::ZeroDivisionError(lhs, rhs); }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043b, \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u043a\u043e\u0434 \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0441\u044f \u043d\u0435\u043e\u043f\u0440\u044f\u0442\u043d\u043e \u0438 \u0441\u0442\u0430\u043b\u043e \u0435\u0449\u0451 \u0445\u0443\u0436\u0435, \u0447\u0435\u043c \u0431\u044b\u043b\u043e. \u0425\u043e\u0442\u044f \u044f \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043a \u0442\u0430\u0431\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430, \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043d\u043e \u043a\u0430\u043a-\u0442\u043e \u043d\u0435\u0443\u043c\u0435\u0441\u0442\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u0435\u043d \u0442\u0435\u0440\u043c\u0438\u043d &#171;\u0442\u0430\u0431\u043b\u0438\u0447\u043d\u043e\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435&#187;, \u0442\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043d\u0438\u043c \u0432 \u043c\u0438\u043d\u0438-\u043a\u043d\u0438\u0433\u0435 &#171;<a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/1053\/\">60 \u0430\u043d\u0442\u0438\u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432 \u0434\u043b\u044f \u0421++ \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430<\/a>&#171;. \u0421\u043c\u043e\u0442\u0440\u0438\u0442\u0435 \u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044b\u0439 \u0432\u0440\u0435\u0434\u043d\u044b\u0439 \u0441\u043e\u0432\u0435\u0442 &#171;\u041a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u044b\u0439 \u043a\u043e\u0434&#187;.<\/p>\n<p>  <\/p>\n<h2 id=\"fragment-n3-bessmyslennyy-vyzov-g_free\">\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N3. \u0411\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 g_free<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">gtk_css_parser_resolve_url (GtkCssParser *self,                             const char   *url) {   char *scheme;    scheme = g_uri_parse_scheme (url);   if (scheme != NULL)     {       GFile *file = g_file_new_for_uri (url);       g_free (scheme);       return file;     }   g_free (scheme);     \/\/ &lt;=    if (self->directory == NULL)     return NULL;    return g_file_resolve_relative_path (self->directory, url); }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v575\/\">V575<\/a> [CWE-628, CERT-EXP37-C] The null pointer is passed into &#8216;g_free&#8217; function. Inspect the first argument. gtkcssparser.c 189<\/p>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>g_free<\/em> \u044f\u0432\u043d\u043e \u043b\u0438\u0448\u043d\u0438\u0439, \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043d\u0435\u0433\u043e \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0451\u0442\u0441\u044f <em>NULL<\/em>. \u041d\u0438\u0447\u0435\u0433\u043e \u0441\u0442\u0440\u0430\u0448\u043d\u043e\u0433\u043e \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0441\u043b\u0443\u0447\u0438\u0442\u0441\u044f. \u0412 <em>g_free<\/em> \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u043e\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c. \u041f\u0440\u043e\u0441\u0442\u043e \u043b\u0438\u0448\u043d\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0430 \u043a\u043e\u0434\u0430.<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u0442\u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439, \u043a\u043e\u0433\u0434\u0430 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c \u0438\u043b\u0438 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u0434. \u0421\u0435\u0439\u0447\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430\u044f \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f.<\/p>\n<p>  <\/p>\n<h2 id=\"fragment-n4-pereuslozhnyonnaya-proverka\">\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N4. \u041f\u0435\u0440\u0435\u0443\u0441\u043b\u043e\u0436\u043d\u0451\u043d\u043d\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">static gboolean is_codepoint (const char *str) {   int i;    \/* 'U' is not code point but 'U00C0' is code point *\/   if (str[0] == '\\0' || str[0] != 'U' || str[1] == '\\0')     return FALSE;    for (i = 1; str[i] != '\\0'; i++)     {       if (!g_ascii_isxdigit (str[i]))         return FALSE;     }    return TRUE; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v590\/\">V590<\/a> [CWE-571, CERT-MSC01-C] Consider inspecting the &#8216;str[0] == &#8216;\\0&#8217; || str[0] != &#8216;U&#187; expression. The expression is excessive or contains a misprint. gtkcomposetable.c 119<\/p>\n<p>  <\/p>\n<p>\u0423\u0441\u043b\u043e\u0432\u0438\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if (str[0] == '\\0' || str[0] != 'U' || str[1] == '\\0')   return FALSE;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u043e\u0436\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if (str[0] != 'U' || str[1] == '\\0')   return FALSE;<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421 \u0442\u043e\u0447\u043a\u0438 \u0437\u0440\u0435\u043d\u0438\u044f \u043b\u043e\u0433\u0438\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u0434\u0430 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u043e\u0441\u044c. \u0422\u0430\u043a \u0441\u0442\u043e\u0438\u0442 \u043b\u0438 \u0443\u043f\u0440\u043e\u0449\u0430\u0442\u044c \u043a\u043e\u0434? \u042f \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u0434\u0430. \u0427\u0435\u043c \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u043a\u043e\u0434, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u043d &#171;\u043f\u0440\u0438\u0442\u044f\u0433\u0438\u0432\u0430\u0435\u0442&#187; \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<p>  <\/p>\n<h2 id=\"fragment-n5-n11-potencialnoe-ispolzovanie-nulevogo-ukazatelya\">\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N5-N11. \u041f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0443\u043b\u0435\u0432\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">static void notify_observers_added (GtkActionMuxer *muxer,                         GtkActionMuxer *parent) {   ....   Action *action;   ....   while (....)   {     ....     if (!action->watchers)       continue;      for (node = action ? action->watchers : NULL; node; node = node->next)       gtk_action_observer_primary_accel_changed (node->data,                                                  GTK_ACTION_OBSERVABLE (muxer),                                                  action_name, NULL);   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v595\/\">V595<\/a> [CWE-476, CERT-EXP12-C] The &#8216;action&#8217; pointer was utilized before it was verified against nullptr. Check lines: 449, 452. gtkactionmuxer.c 449<\/p>\n<p>  <\/p>\n<p>\u0423\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <em>action<\/em> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0440\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e NULL.<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if (!action->watchers) .... for (node = action ? ....)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430\u043b\u0438\u0447\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0443\u043b\u0435\u0432\u044b\u043c. \u041a\u043e\u0434 \u044f\u0432\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if (action == NULL || action->watchers == NULL)   continue;  for (node = action->watchers; node; node = node->next)   gtk_action_observer_primary_accel_changed (node->data,                                              GTK_ACTION_OBSERVABLE (muxer),                                              action_name, NULL);<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043d\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043a\u043e\u0434\u0435. \u041a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043e\u043d\u0430 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445:<\/p>\n<p>  <\/p>\n<ul>\n<li>V595 [CWE-476, CERT-EXP12-C] The &#8216;icon&#8217; pointer was utilized before it was verified against nullptr. Check lines: 2225, 2231. gtkicontheme.c 2225<\/li>\n<li>V595 [CWE-476, CERT-EXP12-C] The &#8216;iw&#8217; pointer was utilized before it was verified against nullptr. Check lines: 194, 199. inspect-button.c 194<\/li>\n<li>V595 [CWE-476, CERT-EXP12-C] The &#8216;contents&#8217; pointer was utilized before it was verified against nullptr. Check lines: 493, 501. file.cpp 493<\/li>\n<li>V595 [CWE-476, CERT-EXP12-C] The &#8216;dispatch->data_poll&#8217; pointer was utilized before it was verified against nullptr. Check lines: 1519, 1523. gtkprintbackendcups.c 1519<\/li>\n<li>V595 [CWE-476, CERT-EXP12-C] The &#8216;top&#8217; pointer was utilized before it was verified against nullptr. Check lines: 1024, 1051. gdkscreen-x11.c 1024<\/li>\n<li>V595 [CWE-476, CERT-EXP12-C] The &#8216;dispatch->backend&#8217; pointer was utilized before it was verified against nullptr. Check lines: 1615, 1624. gtkprintbackendcups.c 1615 <\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"fragment-n12-nesovmestimye-sposoby-vydeleniya-i-osvobozhdeniya-pamyati\">\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N12. \u041d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043f\u0430\u043c\u044f\u0442\u0438<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">static char * strip_ulines (const char *text,               guint      *accel_key) {   ....   new_text = malloc (strlen (text) + 1);     \/\/ &lt;=   ....   return new_text; }  static void finish_text (UriParserData *pdata) {   ....   char *text;   ....   if (pdata->strip_ulines &amp;&amp; strchr (pdata->text_data->str, '_'))   {     text = strip_ulines (pdata->text_data->str, &amp;pdata->accel_key);  \/\/ &lt;=     text_len = strlen (text);   }   else   {     text = pdata->text_data->str;     text_len = pdata->text_data->len;   }   ....   if (text != pdata->text_data->str)     g_free (text);                                                   \/\/ &lt;=   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v611\/\">V611<\/a> [CWE-762, CERT-MEM51-CPP] The memory was allocated using &#8216;malloc&#8217; function but was released using the &#8216;g_free&#8217; function. Consider inspecting operation logics behind the &#8216;text&#8217; variable. gtklabel.c 3383<\/p>\n<p>  <\/p>\n<p>\u041f\u0430\u043c\u044f\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>malloc<\/em>, \u0430 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>g_free<\/em>. \u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 &#171;<a href=\"https:\/\/gnome.pages.gitlab.gnome.org\/libsoup\/glib\/glib-Memory-Allocation.html#glib-Memory-Allocation.description\">Memory Allocation<\/a>&#187; Glib \u0443\u043a\u0430\u0437\u0430\u043d\u043e, \u0447\u0442\u043e \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u043b\u044c\u0437\u044f:<\/p>\n<p>  <\/p>\n<blockquote><p>It&#8217;s important to match g_malloc() (and wrappers such as g_new()) with g_free(), g_slice_alloc() (and wrappers such as g_slice_new()) with g_slice_free(), plain malloc() with free(), and (if you&#8217;re using C++) new with delete and new[] with delete[]. Otherwise bad things can happen, since these allocators may use different memory pools (and new\/delete call constructors and destructors).<\/p><\/blockquote>\n<p>  <\/p>\n<h2 id=\"fragment-n13-cwe-14\">\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N13. CWE-14<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">void overwrite_and_free (gpointer data) {   char *password = (char *) data;    if (password != NULL)     {       memset (password, 0, strlen (password));       g_free (password);     } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v597\/\">V597<\/a> [CWE-14, CERT-MSC06-C] The compiler could delete the &#8216;memset&#8217; function call, which is used to flush &#8216;password&#8217; object. The memset_s() function should be used to erase the private data. gtkprintbackendcups.c 855<\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e\u0442 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b \u0435\u0449\u0451 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043d\u0430\u0447\u0430\u043b\u0430 2021 \u0433\u043e\u0434\u0430, \u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u043a\u043e\u0434 \u043d\u0435 \u0431\u044b\u043b\u043e \u0432\u043d\u0435\u0441\u0435\u043d\u043e \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440. \u041a\u043e\u0434 \u043e\u043f\u0430\u0441\u0435\u043d \u0442\u0435\u043c, \u0447\u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>memset<\/em> \u0432 \u0446\u0435\u043b\u044f\u0445 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e\u0442 \u0431\u0443\u0444\u0435\u0440 \u0431\u043e\u043b\u0435\u0435 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438 \u0441\u0440\u0430\u0437\u0443 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0436\u0430\u043b\u0443\u0439, \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c, \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <em>memset<\/em> \u0438\u0441\u0447\u0435\u0437. \u0420\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u043e\u0437\u0436\u0435 \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<p>\u0421\u0441\u044b\u043b\u043a\u0438 \u0434\u043b\u044f \u0442\u0435\u0445, \u0447\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u044d\u0442\u0438\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u043c \u043e\u0448\u0438\u0431\u043a\u0438:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/0388\/\">\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0430\u044f \u043e\u0447\u0438\u0441\u0442\u043a\u0430 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445<\/a>.<\/li>\n<li><a href=\"https:\/\/cwe.mitre.org\/data\/definitions\/14.html\">CWE-14: Compiler Removal of Code to Clear Buffers<\/a>.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"fragment-n14-nevalidnyy-ukazatel\">\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N14. \u041d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">Offset Offset::init(const char* beg, const char* end) {   Offset offset(0, 0);   if (end == 0) {     end += strlen(beg);   }   offset.add(beg, end);   return offset; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v769\/\">V769<\/a> [CWE-119, CERT-EXP08-C] The &#8216;end&#8217; pointer in the &#8216;end += strlen(beg)&#8217; expression equals nullptr. The resulting value is senseless and it should not be used. position.cpp 36<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c <em>end<\/em> \u043d\u0443\u043b\u0435\u0432\u043e\u0439, \u0442\u043e \u043a \u043d\u0435\u043c\u0443 \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u0438\u043d\u0430 \u0441\u0442\u0440\u043e\u043a\u0438. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0439 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0445\u043e\u0442\u0435\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u043e\u0442 \u044d\u0442\u043e:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">end = beg + strlen(beg);<\/code><\/pre>\n<p>  <\/p>\n<h2 id=\"fragment-n15-utechka-pamyati\">\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N15. \u0423\u0442\u0435\u0447\u043a\u0430 \u043f\u0430\u043c\u044f\u0442\u0438<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">static gboolean query_tooltip (....) {   ....   char *s, *s2;   ....   do {     s = g_strdup_printf (\"%.*f\", precision, self->scale);     l = strlen (s) - 1;     while (s[l] == '0')       l--;     if (s[l] == '.')       s[l] = '\\0';     precision++;   } while (strcmp (s, \"0\") == 0);    label = gtk_label_new (s);   g_free (s);   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v773\/\">V773<\/a> [CWE-401, CERT-MEM31-C, CERT-MEM51-CPP] The &#8216;s&#8217; pointer was assigned values twice without releasing the memory. A memory leak is possible. demo3widget.c 79<\/p>\n<p>  <\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <em><a href=\"https:\/\/docs.gtk.org\/glib\/func.strdup_printf.html\">g_strdup_printf<\/a><\/em> \u0441\u0445\u043e\u0436\u0430 \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 C \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <em>sprintf<\/em>, \u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u0435\u0439, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d\u0430 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442 \u043d\u0443\u0436\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u043c\u044f\u0442\u0438, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u0442\u044c\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u0430.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u0440\u0430\u0437 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0431\u0443\u0444\u0435\u0440\u0430 \u0432 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435 \u043d\u0435\u0442. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0446\u0438\u043a\u043b\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0443\u0442\u0435\u0447\u043a\u0430 \u043f\u0430\u043c\u044f\u0442\u0438. \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u044b\u0437\u043e\u0432 <em>g_free<\/em> \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0432\u043e\u0439 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438 \u0446\u0438\u043a\u043b\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">s = NULL; do {   g_free(s); \/\/ \u0412 g_free \u043c\u043e\u0436\u043d\u043e \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c NULL.   s = g_strdup_printf (\"%.*f\", precision, self->scale);   l = strlen (s) - 1;   while (s[l] == '0')     l--;   if (s[l] == '.')     s[l] = '\\0';   precision++; } while (strcmp (s, \"0\") == 0);  label = gtk_label_new (s); g_free (s);<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u0442\u0440\u0443\u0434\u043d\u044f\u044e\u0441\u044c \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0435\u0441\u0442\u044c \u043b\u0438 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0441\u0442\u0438\u043b\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 C, \u0433\u0434\u0435 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0438 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u0435\u043c \u043f\u0430\u043c\u044f\u0442\u0438. \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043e\u0431\u0437\u043e\u0440 \u043a\u043e\u0434\u0430, \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b.<\/p>\n<p>  <\/p>\n<h2 id=\"fragment-n16-29-bolee-prostye-utechki-pamyati\">\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N16-29. \u0411\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0443\u0442\u0435\u0447\u043a\u0438 \u043f\u0430\u043c\u044f\u0442\u0438<\/h2>\n<p>  <\/p>\n<p>\u0412 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 GTK \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 PVS-Studio \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0443\u0442\u0435\u0447\u043a\u0438 \u043f\u0430\u043c\u044f\u0442\u0438, \u043d\u043e \u043e\u043d\u0438 \u043d\u0435 \u0441\u0442\u043e\u043b\u044c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b. \u041e\u0448\u0438\u0431\u043a\u0438 \u0441\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u0440\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u0431\u044b\u043b\u0438 \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u043f\u0430\u043c\u044f\u0442\u044c. \u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">static void update_columns (GtkTreeView *view, ViewColumnModel *view_model) {   ....   int *new_order;   new_order = g_new (int, length);      \/\/ &lt;=   ....   while (a->data == b->data)   {     a = a->next;     b = b->next;     if (a == NULL)       return;                           \/\/ &lt;=     m++;   }   ....   g_free (new_order);   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v773\/\">V773<\/a> [CWE-401, CERT-MEM31-C, CERT-MEM51-CPP] The function was exited without releasing the &#8216;new_order&#8217; pointer. A memory leak is possible. testtreecolumns.c 441<\/p>\n<p>  <\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0441\u043f\u0438\u0441\u043a\u0438 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b, \u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u0440\u0435\u0436\u0434\u0435\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438, \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <em>new_order<\/em>.<\/p>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0414\u0440\u0443\u0433\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0442\u0430\u043a\u043e\u0433\u043e-\u0436\u0435 \u0442\u0438\u043f\u0430&#8230;<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<ul>\n<li>V773 [CWE-401, CERT-MEM31-C, CERT-MEM51-CPP] The function was exited without releasing the &#8216;data&#8217; pointer. A memory leak is possible. widget-factory.c 1307<\/li>\n<li>V773 [CWE-401, CERT-MEM31-C, CERT-MEM51-CPP] The function was exited without releasing the &#8216;args&#8217; pointer. A memory leak is possible. gskglshader.c 1004<\/li>\n<li>V773 [CWE-401, CERT-MEM31-C, CERT-MEM51-CPP] The function was exited without releasing the &#8216;url&#8217; pointer. A memory leak is possible. gtkcsstokenizer.c 973<\/li>\n<li>V773 [CWE-401, CERT-MEM31-C, CERT-MEM51-CPP] The function was exited without releasing the &#8216;str&#8217; pointer. A memory leak is possible. gtkimcontextsimple.c 483<\/li>\n<li>V773 [CWE-401, CERT-MEM31-C, CERT-MEM51-CPP] The function was exited without releasing the &#8216;info&#8217; pointer. A memory leak is possible. gtkprintbackendcups.c 3034<\/li>\n<li>V773 [CWE-401, CERT-MEM31-C, CERT-MEM51-CPP] The function was exited without releasing the &#8216;resource&#8217; pointer. A memory leak is possible. gtkprintbackendcups.c 4165<\/li>\n<li>V773 [CWE-401, CERT-MEM31-C, CERT-MEM51-CPP] The function was exited without releasing the &#8216;string&#8217; pointer. A memory leak is possible. maplistmodel.c 62<\/li>\n<li>V773 [CWE-401, CERT-MEM31-C, CERT-MEM51-CPP] The function was exited without releasing the &#8216;string&#8217; pointer. A memory leak is possible. noselection.c 62<\/li>\n<li>V773 [CWE-401, CERT-MEM31-C, CERT-MEM51-CPP] The function was exited without releasing the &#8216;string&#8217; pointer. A memory leak is possible. slicelistmodel.c 61<\/li>\n<li>V773 [CWE-401, CERT-MEM31-C, CERT-MEM51-CPP] The function was exited without releasing the &#8216;string&#8217; pointer. A memory leak is possible. multiselection.c 62<\/li>\n<li>V773 [CWE-401, CERT-MEM31-C, CERT-MEM51-CPP] The function was exited without releasing the &#8216;string&#8217; pointer. A memory leak is possible. sortlistmodel.c 62<\/li>\n<li>V773 [CWE-401, CERT-MEM31-C, CERT-MEM51-CPP] The function was exited without releasing the &#8216;string&#8217; pointer. A memory leak is possible. singleselection.c 62<\/li>\n<\/ul>\n<\/div><\/div>\n<p>  <\/p>\n<h2 id=\"fragment-n30-oshibka-v-logike\">\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N30. \u041e\u0448\u0438\u0431\u043a\u0430 \u0432 \u043b\u043e\u0433\u0438\u043a\u0435<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">static void gtk_section_model_default_get_section (GtkSectionModel *self,                                        guint            position,                                        guint           *out_start,                                        guint           *out_end) {   guint n_items = g_list_model_get_n_items (G_LIST_MODEL (self));    if (position >= n_items)     {       *out_start = n_items;       *out_end = G_MAXUINT;     }    *out_start = 0;   *out_end = n_items; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f PVS-Studio:<\/p>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v519\/\">V519<\/a> [CWE-563, CERT-MSC13-C] The &#8216;* out_start&#8217; variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 67, 71. gtksectionmodel.c 71<\/li>\n<li><a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v519\/\">V519<\/a> [CWE-563, CERT-MSC13-C] The &#8216;* out_end&#8217; variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 68, 72. gtksectionmodel.c 72<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0421 \u043a\u043e\u0434\u043e\u043c \u044f\u0432\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u043d\u0435 \u0442\u0430\u043a. \u041d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432 \u043a\u043e\u0434\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 <em>else<\/em>-\u0432\u0435\u0442\u043a\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">if (position >= n_items) {   *out_start = n_items;   *out_end = G_MAXUINT; } else {   *out_start = 0;   *out_end = n_items; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u042f \u043d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d, \u0447\u0442\u043e \u043a\u043e\u0434 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a, \u0442.\u043a. \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 GTK. \u042f \u043c\u043e\u0433\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u043a\u043e\u0434 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u044e, \u0430 \u0432\u043e\u0442 \u043a\u0430\u043a \u0435\u0451 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u2013 \u043c\u043e\u0433\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0442\u044c.<\/p>\n<p>  <\/p>\n<h2 id=\"fragment-n31-krasivaya-opechatka-v-uslovii\">\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N31. \u041a\u0440\u0430\u0441\u0438\u0432\u0430\u044f \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u0438<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">static int gtk_tree_list_row_sort_keys_compare (gconstpointer a,                                      gconstpointer b,                                      gpointer      data) {   ....   gpointer *keysa = (gpointer *) a;   gpointer *keysb = (gpointer *) b;   ....   resa = unpack (keysa, &amp;keysa, &amp;sizea);   resb = unpack (keysb, &amp;keysb, &amp;sizeb);   if (!resa)     return resb ? GTK_ORDERING_LARGER :       (keysa[2] &lt; keysb[2] ? GTK_ORDERING_SMALLER :        (keysb[2] > keysa[2] ? GTK_ORDERING_LARGER : GTK_ORDERING_EQUAL));   else if (!resb)     return GTK_ORDERING_SMALLER;   .... }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435, \u043d\u0435 \u0447\u0438\u0442\u0430\u044f \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435, \u043d\u0430\u0439\u0442\u0438 \u043e\u0448\u0438\u0431\u043a\u0443. \u0412\u0438\u0434\u0438\u0442\u0435 \u0435\u0451? \u041d\u0430\u0448 \u0435\u0434\u0438\u043d\u043e\u0440\u043e\u0433 \u043f\u043e\u043a\u0430 \u0436\u0434\u0451\u0442 \u0432\u0430\u0441 \u0438 \u043f\u044c\u0451\u0442 \u043a\u043e\u0444\u0435.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/d48\/f14\/b26\/d48f14b26af98b80d31248dceee5f668.png\" alt=\"\u0415\u0434\u0438\u043d\u043e\u0440\u043e\u0433 \u041a\u043e\u0434\u0438 \u043f\u043e\u043a\u0430 \u0436\u0434\u0451\u0442 \u0432\u0430\u0441 \u0438 \u043f\u044c\u0451\u0442 \u043a\u043e\u0444\u0435\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/d48\/f14\/b26\/d48f14b26af98b80d31248dceee5f668.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0434\u0443\u043c\u0430\u044e, \u044d\u0442\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e \u0443\u0441\u0438\u043b\u0438\u0439. \u0425\u043e\u0440\u043e\u0448\u043e, \u0447\u0442\u043e \u0432 \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u0430\u0445 \u0435\u0441\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043a\u0430\u043a \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v547\/\">V547<\/a> [CWE-570] Expression &#8216;keysb[2] > keysa[2]&#8217; is always false. gtktreelistrowsorter.c 158<\/p>\n<p>  <\/p>\n<p>\u041e\u0448\u0438\u0431\u043a\u0430 \u0437\u0434\u0435\u0441\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"cpp\">.... keysa[2] &lt; keysb[2] ? .... .... keysb[2] > keysa[2] ? ....<\/code><\/pre>\n<p>  <\/p>\n<p>\u042d\u0442\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b. \u041f\u043e\u043c\u0435\u043d\u044f\u043b\u0438 \u043c\u0435\u0441\u0442\u0430\u043c\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u044b \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u043b\u0438 <em>&lt;<\/em> \u043d\u0430 <em>><\/em>. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435.<\/p>\n<p>  <\/p>\n<h2 id=\"fragment-n32-simvol-tabulyacii\">\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N32. \u0421\u0438\u043c\u0432\u043e\u043b \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0438<\/h2>\n<p>  <\/p>\n<p>\u0418 \u0432 \u043a\u043e\u043d\u0446\u0435 \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 &#171;\u043a\u043e\u0434\u0430 \u0441 \u0437\u0430\u043f\u0430\u0445\u043e\u043c&#187;. \u041f\u0440\u044f\u043c \u0441 \u043d\u043e\u0433 \u0432\u0430\u043b\u0438\u0442 \ud83d\ude42<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/bd8\/39e\/ff5\/bd839eff55506c62829ab902891a5827.png\" alt=\"\u041a\u043e\u0434 \u0441 Tab\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/bd8\/39e\/ff5\/bd839eff55506c62829ab902891a5827.png\"\/><\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v581\/\">V581<\/a> [CWE-670] The conditional expressions of the &#8216;if&#8217; statements situated alongside each other are identical. Check lines: 674, 675. sass2scss.cpp 675<\/p>\n<p>  <\/p>\n<p>\u0412\u0438\u0434\u0438\u0442\u0435 \u044d\u0442\u0438 &#171;\u0434\u0432\u0430 \u043f\u0440\u043e\u0431\u0435\u043b\u0430&#187;? \u0422\u0430\u043a \u0432\u043e\u0442, \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0431\u0435\u043b\u044b, \u0430 \u0441\u0438\u043c\u0432\u043e\u043b \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0438!<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/ae3\/f92\/917\/ae3f92917a8a98e987b79534d2594550.png\" alt=\"\u041a\u043e\u0434 \u0441 Tab\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/ae3\/f92\/917\/ae3f92917a8a98e987b79534d2594550.png\"\/><\/p>\n<p>  <\/p>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c &#8216;\\t&#8217;, \u043a\u0442\u043e-\u0442\u043e, \u043d\u0435 \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u044f\u0441\u044c, \u043d\u0430\u0436\u0430\u043b \u0441\u0438\u043c\u0432\u043e\u043b \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0438. \u041e\u0447\u0435\u043d\u044c \u043f\u043b\u043e\u0445\u0430\u044f \u0438\u0434\u0435\u044f \u043f\u043e \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0443 \u043f\u0440\u0438\u0447\u0438\u043d:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041a\u043e\u0434 \u0441\u0431\u0438\u0432\u0430\u0435\u0442 \u0441 \u0442\u043e\u043b\u043a\u0443;<\/li>\n<li>\u041c\u043e\u0436\u0435\u0442 \u0442\u0430\u043a \u0441\u043e\u0432\u043f\u0430\u0441\u0442\u044c, \u0447\u0442\u043e \u0441\u0438\u043c\u0432\u043e\u043b \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432 \u043a\u043e\u0434\u0435 \u043a\u0430\u043a \u043f\u0440\u043e\u0431\u0435\u043b, \u0447\u0442\u043e \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u0431\u0438\u0432\u0430\u0442\u044c \u0441 \u0442\u043e\u043b\u043a\u0443;<\/li>\n<li>\u041f\u0440\u0438 \u0440\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433\u0435, \u0430\u0432\u0442\u043e\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043a\u043e\u0434\u0430, \u0441\u043b\u0438\u044f\u043d\u0438\u0438 \u043a\u043e\u0434\u0430 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435, \u0441\u0438\u043c\u0432\u043e\u043b \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0438 \u043b\u0435\u0433\u043a\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u043c\u0435\u043d\u0451\u043d \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0445 \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u0430\u0445 \u044f \u043e\u043f\u0438\u0441\u0430\u043b \u0432 \u043a\u043d\u0438\u0433\u0435 &#171;<a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/1053\/\">60 \u0430\u043d\u0442\u0438\u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432 \u0434\u043b\u044f \u0421++ \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0430<\/a>&#171;. \u041f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0443\u0437\u043d\u0430\u0442\u044c \u0435\u0449\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432, \u043a\u0430\u043a \u043d\u0435 \u043d\u0430\u0434\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435. \u041d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0432\u0430\u043c \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u0434\u0430\u043b \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u043e \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u044b\u044f\u0432\u0438\u043b \u044d\u0442\u0443 \u043e\u0448\u0438\u0431\u043a\u0443 \u043a\u043e\u0441\u0432\u0435\u043d\u043d\u043e. \u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u043b\u0435\u043a\u0441\u0435\u0440\u0430 \u0438 \u043f\u0430\u0440\u0441\u0435\u0440\u0430 \u043c\u044b \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u043c \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0438 \u0438 \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0441\u0435 \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0438 \u0437\u0430\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u043e\u0431\u0435\u043b\u044b. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u0447\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0447\u043d\u044b.<\/p>\n<p>  <\/p>\n<h2 id=\"fragment-n33-ne-ta-konstanta\">\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 N33. \u041d\u0435 \u0442\u0430 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430<\/h2>\n<p>  <\/p>\n<pre><code class=\"cpp\">typedef enum {   GDK_MEMORY_B8G8R8A8_PREMULTIPLIED,   GDK_MEMORY_A8R8G8B8_PREMULTIPLIED,   GDK_MEMORY_R8G8B8A8_PREMULTIPLIED,   ....   \/\/ \u0422\u0443\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0435\u0437\u0430\u043d\u043e.   \/\/ \u0412\u0441\u0435\u0433\u043e \u0437\u0434\u0435\u0441\u044c 27 \u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442.   \/\/ GDK_MEMORY_N_FORMATS - \u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044c \u0432\u043e\u0441\u044c\u043c\u0430\u044f,   \/\/ \u043d\u043e \u0440\u0430\u0432\u043d\u0430 \u043e\u043d\u0430 27, \u0442\u0430\u043a \u043a\u0430\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0438\u0434\u0443\u0442 \u043e\u0442 0.   ....   GDK_MEMORY_A16 GDK_AVAILABLE_ENUMERATOR_IN_4_12,   GDK_MEMORY_A16_FLOAT GDK_AVAILABLE_ENUMERATOR_IN_4_12,   GDK_MEMORY_A32_FLOAT GDK_AVAILABLE_ENUMERATOR_IN_4_12,    GDK_MEMORY_N_FORMATS } GdkMemoryFormat;  static const char *format_name[] = {   \"BGRAp\", \"ARGBp\", \"RGBAp\",   \"BGRA\", \"ARGB\", \"RGBA\", \"ABGR\",   \"RGB\", \"BGR\", NULL };  static const char * format_to_string (GdkMemoryFormat format) {   if (format &lt; GDK_MEMORY_N_FORMATS)     return format_name[format];   else     return \"ERROR\"; }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435 PVS-Studio: <a href=\"https:\/\/pvs-studio.ru\/ru\/docs\/warnings\/v557\/\">V557<\/a> [CWE-119, CERT-ARR30-C] Array overrun is possible. The value of &#8216;format&#8217; index could reach 27. testupload.c 13<\/p>\n<p>  <\/p>\n<p>\u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430 <em>GDK_MEMORY_N_FORMATS<\/em> \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043a \u043c\u0430\u0441\u0441\u0438\u0432\u0443 <em>format_name<\/em>. \u0412 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u044f\u0432\u043d\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0447\u0435\u043c 27. \u0422\u0430\u043a \u0447\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u0442 \u043e\u0442 \u0432\u044b\u0445\u043e\u0434\u0430 \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u0430. \u042d\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0430\u0436\u0435 \u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043a\u0430\u043a \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c. \u041c\u043d\u0435 \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0440\u044f\u0434\u043e\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430 \u044d\u0442\u043e \u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0447\u043d\u043e \u0441\u0442\u043e\u0438\u0442 \u0432\u0437\u0433\u043b\u044f\u043d\u0443\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c.<\/p>\n<p>  <\/p>\n<h2 id=\"spasibo-za-vnimanie\">\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 GTK \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0448\u0438\u0431\u043e\u043a, \u0430 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u043d\u0438\u043a\u043d\u0443\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043b\u043e\u0433\u0438\u0435\u0439 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043a\u043e\u0434\u0430.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u043e\u0448\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u044e\u0442 \u0435\u0433\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0431\u0430\u0433\u0438 \u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u0442\u044c \u043f\u0440\u0438 \u043e\u0431\u0437\u043e\u0440\u0430\u0445 \u043a\u043e\u0434\u0430. \u0421\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e, \u0430 \u043d\u0435 \u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u044f \u043a \u0441\u043b\u0443\u0447\u0430\u044e.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u044e <a href=\"https:\/\/pvs-studio.ru\/ru\/pvs-studio\/download\/?utm_source=website&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=1076\">\u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c PVS-Studio<\/a> \u043d\u0430 \u0432\u0430\u0448\u0438\u0445 \u0440\u0430\u0431\u043e\u0447\u0438\u0445 \u0438\u043b\u0438 \u0434\u043e\u043c\u0430\u0448\u043d\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0441 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u0439 \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0435\u0439, \u0442\u043e \u043f\u0440\u043e\u0448\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434: Andrey Karpov. <a href=\"https:\/\/pvs-studio.com\/en\/blog\/posts\/cpp\/1076\/\">Typos, null pointers, and treacherous TAB: 33 fragments in the GTK library<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/770050\/\"> https:\/\/habr.com\/ru\/articles\/770050\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ak\/xh\/g9\/akxhg9ckweg01usq2dysq7gamac.png\" alt=\"\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 TAB \u0432 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u043c \u043b\u0438\u0442\u0435\u0440\u0430\u043b\u0435\" data-src=\"https:\/\/habrastorage.org\/webt\/ak\/xh\/g9\/akxhg9ckweg01usq2dysq7gamac.png\"\/><\/p>\n<p>  <\/p>\n<p>GTK \u2013 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0439 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 PVS-Studio. \u0422\u0435\u043c \u0431\u043e\u043b\u0435\u0435, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0443\u044e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u043e\u043a\u043e\u043b\u043e 3 \u043b\u0435\u0442 \u043d\u0430\u0437\u0430\u0434, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442, \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u043d\u0430\u0439\u0434\u0451\u043c \u0432 \u043d\u0451\u043c \u043d\u043e\u0432\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438.<\/p>\n<p>  <\/p>\n<p>\u041e\u0447\u0435\u043d\u044c \u043d\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0438\u0437 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 &#171;<a href=\"https:\/\/pvs-studio.ru\/ru\/blog\/posts\/cpp\/0793\/\">\u0412\u044b\u044f\u0432\u043b\u044f\u0435\u043c \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 GTK 4 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e PVS-Studio<\/a>&#171;, \u043d\u043e \u043f\u043e\u0434\u043e\u0437\u0440\u0435\u0432\u0430\u044e, \u0447\u0442\u043e \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0432\u0441\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438 \u0437\u043d\u0430\u043a\u043e\u043c\u044b \u0441 GTK. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043a\u0440\u0430\u0442\u0446\u0435: \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0435\u043d\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u041f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u0430 \u0438 \u0438\u043c\u0435\u0435\u0442 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 <a href=\"https:\/\/gitlab.gnome.org\/GNOME\/gtk\">\u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434<\/a>, \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u043e\u0434 GNU GPL, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u0432 \u043b\u044e\u0431\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 (\u0434\u0430\u0436\u0435 \u043a\u043e\u043c\u043c\u0435\u0440\u0447\u0435\u0441\u043a\u0438\u0445).<\/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-358538","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/358538","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=358538"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/358538\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=358538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=358538"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=358538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}