summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-05-14 03:02:45 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-05-14 03:02:45 +0000
commit125a4eab6e670ea530a076e8035c344784fa961a (patch)
tree312e7f6b913b2504c5ebe82835fc1199e04b708f
parent46e4b4aee055c58265c77254b1dd085f17e3e859 (diff)
downloadxine-lib-125a4eab6e670ea530a076e8035c344784fa961a.tar.gz
xine-lib-125a4eab6e670ea530a076e8035c344784fa961a.tar.bz2
fix segfault after getpwuid_r as suggested by Gianluca Amato
CVS patchset: 1885 CVS date: 2002/05/14 03:02:45
-rw-r--r--src/xine-utils/utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/xine-utils/utils.c b/src/xine-utils/utils.c
index d06341111..65c678b6a 100644
--- a/src/xine-utils/utils.c
+++ b/src/xine-utils/utils.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: utils.c,v 1.6 2002/05/14 02:34:37 miguelfreitas Exp $
+ * $Id: utils.c,v 1.7 2002/05/14 03:02:45 miguelfreitas Exp $
*
*/
#define _POSIX_PTHREAD_SEMANTICS 1 /* for 5-arg getpwuid_r on solaris */
@@ -76,11 +76,11 @@ const char *xine_get_homedir(void) {
int ret;
struct passwd pwd;
char *buffer = NULL;
- int bufsize = 128;
+ int bufsize = 256;
buffer = (char *) xine_xmalloc(bufsize);
- if((ret = getpwuid_r(getuid(), &pwd, buffer, bufsize, &pw)) < 0) {
+ if((ret = getpwuid_r(getuid(), &pwd, buffer, bufsize, &pw)) != 0) {
#else
if((pw = getpwuid(getuid())) == NULL) {
#endif