From 682d1942bc6ada61a8f1e37221b0c8374e4355c5 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Sat, 18 Dec 2010 16:06:36 +0200 Subject: [PATCH] =?utf8?q?=D0=A3=20=D0=BA=D0=BE=D0=BD=D1=81=D0=BE=D0=BB?= =?utf8?q?=D1=8C=D0=BD=D0=BE=D0=BC=D1=83=20=D0=BA=D0=BE=D0=BD=D1=84=D1=96?= =?utf8?q?=D0=B3=D1=83=D1=80=D0=B0=D1=82=D0=BE=D1=80=D1=96=20=D0=B4=D0=BE?= =?utf8?q?=D0=B4=D0=B0=D0=BD=D0=BE=20=D0=B7=D0=B0=D0=B2=D0=B5=D1=80=D1=88?= =?utf8?q?=D1=83=D1=8E=D1=87=D0=B8=D0=B9=20=D0=BD=D1=83=D0=BB=D1=8C=20?= =?utf8?q?=D0=BF=D1=96=D1=81=D0=BB=D1=8F=20=D0=B2=D0=B8=D0=BA=D0=BE=D1=80?= =?utf8?q?=D0=B8=D1=81=D1=82=D0=B0=D0=BD=D0=BD=D1=8F=20=D1=84=D1=83=D0=BD?= =?utf8?q?=D0=BA=D1=86=D1=96=D1=97=20srncpy=20(=D0=B2=D0=BE=D0=BD=D0=B0=20?= =?utf8?q?=D0=BD=D0=B5=20=D0=B3=D0=B0=D1=80=D0=B0=D0=BD=D1=82=D1=83=D1=94?= =?utf8?q?=20=D0=B7=D0=B0=D0=B2=D0=B5=D1=80=D1=88=D0=B5=D0=BD=D0=BD=D1=8F?= =?utf8?q?=20=D1=80=D1=8F=D0=B4=D0=BA=D0=B0=20=D0=BD=D1=83=D0=BB=D0=B5?= =?utf8?q?=D0=BC)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- projects/sgconf/main.cpp | 2 ++ projects/sgconf/sginfo.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/projects/sgconf/main.cpp b/projects/sgconf/main.cpp index 5e52d37d..0a2e12b4 100644 --- a/projects/sgconf/main.cpp +++ b/projects/sgconf/main.cpp @@ -184,6 +184,8 @@ char * str; str = new char[strlen(c) + 1]; strncpy(str, c, strlen(c)); +str[strlen(c)] = 0; + msg = strchr(str, ':'); if (msg) diff --git a/projects/sgconf/sginfo.cpp b/projects/sgconf/sginfo.cpp index c5ab3eaf..1c9048e7 100644 --- a/projects/sgconf/sginfo.cpp +++ b/projects/sgconf/sginfo.cpp @@ -185,6 +185,8 @@ char * str; str = new char[strlen(c) + 1]; strncpy(str, c, strlen(c)); +str[strlen(c)] = 0; + msg = strchr(str, ':'); if (msg) -- 2.44.2