workaround-gcc-lintian

# DP: lintian finds “characte” in the source and tags it as a
# DP: spelling mistake, but it’s an artefact of GCC inlining
# DP: the strcpy call below; unify the way how err is produced
# DP: and use a secure string function while at it
# DP: lintian finds “characte” in the source and tags it as a
# DP: spelling mistake, but it’s an artefact of GCC inlining
# DP: the strcpy call below; unify the way how err is produced
# DP: and use a secure string function while at it


Gbp-Pq: Name 0005-workaround-gcc-lintian.patch
This commit is contained in:
Ubuntu Developers 2022-05-14 02:57:07 +08:00 committed by openKylinBot
parent 5197ae0d8e
commit 9b8b295853
1 changed files with 9 additions and 4 deletions

View File

@ -1507,12 +1507,17 @@ void read_inittab(void)
if (!action || !*action)
strcpy(err, "missing action field");
if (id && strlen(id) > sizeof(utproto.ut_id))
sprintf(err, "id field too long (max %d characters)",
(int)sizeof(utproto.ut_id));
snprintf(err, sizeof(err),
"%s field too long (max %d characters)",
"id", (int)sizeof(utproto.ut_id));
if (rlevel && strlen(rlevel) > 11)
strcpy(err, "rlevel field too long (max 11 characters)");
snprintf(err, sizeof(err),
"%s field too long (max %d characters)",
"rlevel", 11);
if (process && strlen(process) > 127)
strcpy(err, "process field too long (max 127 characters)");
snprintf(err, sizeof(err),
"%s field too long (max %d characters)",
"process", 127);
if (action && strlen(action) > 32)
strcpy(err, "action field too long");
if (err[0] != 0) {