+ documentation-accounting-getdelaysc-cleaning-up-missing-null-terminate-after-strncpy-call.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: + documentation-accounting-getdelaysc-cleaning-up-missing-null-terminate-after-strncpy-call.patch added to -mm tree
To: rickard_strandqvist@xxxxxxxxxxxxxxxxxx,keescook@xxxxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Thu, 12 Jun 2014 14:47:01 -0700


The patch titled
     Subject: Documentation/accounting/getdelays.c: add missing null-terminate after strncpy call
has been added to the -mm tree.  Its filename is
     documentation-accounting-getdelaysc-cleaning-up-missing-null-terminate-after-strncpy-call.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/documentation-accounting-getdelaysc-cleaning-up-missing-null-terminate-after-strncpy-call.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/documentation-accounting-getdelaysc-cleaning-up-missing-null-terminate-after-strncpy-call.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Rickard Strandqvist <rickard_strandqvist@xxxxxxxxxxxxxxxxxx>
Subject: Documentation/accounting/getdelays.c: add missing null-terminate after strncpy call

Added a guaranteed null-terminate after call to strncpy.

This was partly found using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@xxxxxxxxxxxxxxxxxx>
Acked-by: Kees Cook <keescook@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 Documentation/accounting/getdelays.c |    1 +
 1 file changed, 1 insertion(+)

diff -puN Documentation/accounting/getdelays.c~documentation-accounting-getdelaysc-cleaning-up-missing-null-terminate-after-strncpy-call Documentation/accounting/getdelays.c
--- a/Documentation/accounting/getdelays.c~documentation-accounting-getdelaysc-cleaning-up-missing-null-terminate-after-strncpy-call
+++ a/Documentation/accounting/getdelays.c
@@ -314,6 +314,7 @@ int main(int argc, char *argv[])
 			break;
 		case 'm':
 			strncpy(cpumask, optarg, sizeof(cpumask));
+			cpumask[sizeof(cpumask) - 1] = '\0';
 			maskset = 1;
 			printf("cpumask %s maskset %d\n", cpumask, maskset);
 			break;
_

Patches currently in -mm which might be from rickard_strandqvist@xxxxxxxxxxxxxxxxxx are

origin.patch
documentation-accounting-getdelaysc-cleaning-up-missing-null-terminate-after-strncpy-call.patch
linux-next.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux