Ticket #10686: 0001-libbe_build.so-fix-unterminated-string-in-BEntry-set.patch

File 0001-libbe_build.so-fix-unterminated-string-in-BEntry-set.patch, 796 bytes (added by jessicah, 11 years ago)
  • src/build/libbe/storage/Entry.cpp

    From 529f7ac49af9a6088b79bad1f2513d9b9b8c64fa Mon Sep 17 00:00:00 2001
    From: Jessica Hamilton <jessica.l.hamilton@gmail.com>
    Date: Mon, 17 Mar 2014 11:47:45 +0000
    Subject: [PATCH] libbe_build.so: fix unterminated string in BEntry::set. Fixes
     #10686.
    
    ---
     src/build/libbe/storage/Entry.cpp | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/src/build/libbe/storage/Entry.cpp b/src/build/libbe/storage/Entry.cpp
    index 2f6accf..64c3fef 100644
    a b BEntry::set(int dirFD, const char *path, bool traverse)  
    989989            error = _kern_read_link(dirFD, leafName, tmpPath, &bufferSize);
    990990            if (error < 0)
    991991                return error;
     992            tmpPath[bufferSize] = '\0';
    992993            path = tmpPath;
    993994            // next round...
    994995        }