From: <ale...@us...> - 2014-02-25 09:27:32
|
Revision: 59197 http://sourceforge.net/p/firebird/code/59197 Author: alexpeshkoff Date: 2014-02-25 09:27:28 +0000 (Tue, 25 Feb 2014) Log Message: ----------- Fixed posix build and expected logic of the code Modified Paths: -------------- firebird/trunk/src/common/config/os/posix/binreloc.c Modified: firebird/trunk/src/common/config/os/posix/binreloc.c =================================================================== --- firebird/trunk/src/common/config/os/posix/binreloc.c 2014-02-25 09:02:35 UTC (rev 59196) +++ firebird/trunk/src/common/config/os/posix/binreloc.c 2014-02-25 09:27:28 UTC (rev 59197) @@ -46,16 +46,12 @@ return NULL; #else char *line, *result; - size_t buf_size; + size_t buf_size = (PATH_MAX > SSIZE_MAX ? SSIZE_MAX : PATH_MAX) - 1; ssize_t size; struct stat stat_buf; FILE *f; /* Read from /proc/self/exe (symlink) */ - if (sizeof (path) > SSIZE_MAX) - buf_size = SSIZE_MAX - 1; - else - buf_size = PATH_MAX - 1; char* path = (char *) malloc (buf_size); if (path == NULL) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |