Ticket #11770: 0001-CID-608995-Copy-into-fixed-size-buffer-added-check.patch

File 0001-CID-608995-Copy-into-fixed-size-buffer-added-check.patch, 765 bytes (added by sli908, 10 years ago)

patch that adds size check

  • headers/private/media/ServerInterface.h

    From 74bd787d4c460badcc235ce86024727960ba2634 Mon Sep 17 00:00:00 2001
    From: Sid Kurella <mastersidkurella@gmail.com>
    Date: Sun, 18 Jan 2015 21:14:42 -0500
    Subject: [PATCH] CID 608995: Copy into fixed size buffer - added check
    
    ---
     headers/private/media/ServerInterface.h | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/headers/private/media/ServerInterface.h b/headers/private/media/ServerInterface.h
    index 13249eb..104a063 100644
    a b public:  
    226226    {
    227227        device = ref.device;
    228228        directory = ref.directory;
    229         if (ref.name)
     229        if (ref.name && sizeof(ref.name) <= sizeof(name))
    230230            strcpy(name, ref.name);
    231231        else
    232232            name[0] = 0;