X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/1c03fa9d8e85b15167dce2d7007132fe87698bc8..418ee17e8bd250785855ca3f3f1ff0e19331d498:/sbr/mts.c diff --git a/sbr/mts.c b/sbr/mts.c index 4c95f481..5f4e3676 100644 --- a/sbr/mts.c +++ b/sbr/mts.c @@ -246,7 +246,7 @@ LocalName (int flag) /* check if the mts.conf file specifies a "localname" */ if (*localname && flag == 0) { - strncpy (buf, localname, sizeof(buffer0)); + strncpy (buf, localname, sizeof(buffer0) - 1); } else { memset(buf, 0, sizeof(buffer0)); /* first get our local name */ @@ -293,7 +293,7 @@ SystemName (void) /* check if mts.conf file specifies a "systemname" */ if (*systemname) { - strncpy (buffer, systemname, sizeof(buffer)); + strncpy (buffer, systemname, sizeof(buffer) - 1); return buffer; } @@ -409,7 +409,7 @@ getuserinfo (void) char *at_sign = strchr (np, '@'); char *right_angle_bracket = strchr (np, '>'); - strncpy(localmbox, np, sizeof(localmbox)); + strncpy(localmbox, np, sizeof(localmbox) - 1); if (left_angle_bracket && at_sign && right_angle_bracket) { if (at_sign > left_angle_bracket &&