X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fbuilder%2Fbuilder-filesystem.h;h=d7118dd1f670118475a5daa97da4bfb82c27524b;hp=bbb77d7aeec210b1c4dcd463b6712d1fb1537b2f;hb=a0424ec129d3799ee0dab4a46600d167b2b7c71c;hpb=57869973578f6a0b0f836d396c7232ddb8302c6b diff --git a/dali-toolkit/internal/builder/builder-filesystem.h b/dali-toolkit/internal/builder/builder-filesystem.h old mode 100644 new mode 100755 index bbb77d7..d7118dd --- a/dali-toolkit/internal/builder/builder-filesystem.h +++ b/dali-toolkit/internal/builder/builder-filesystem.h @@ -46,7 +46,9 @@ inline std::string ExpandPath(const std::string &name) inline std::string ExePath(void) { char buf[256]; - readlink("/proc/self/exe", buf, sizeof(buf)); + ssize_t len = readlink("/proc/self/exe", buf, sizeof(buf) - 1); + len = len > 0 ? len : 0; + buf[len] = '\0'; return std::string(buf); }