Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 125701 | Differences between
and this patch

Collapse All | Expand All

(-)src/libsandbox.c (-9 / +5 lines)
Lines 913-919 Link Here
913
	errno = 0;
913
	errno = 0;
914
	tmpbuf = true_getcwd_DEFAULT(buf, size);
914
	tmpbuf = true_getcwd_DEFAULT(buf, size);
915
	sandbox_on = 1;
915
	sandbox_on = 1;
916
	if (tmpbuf) {
916
	if ((tmpbuf) && (errno == 0)) {
917
		old_errno = errno;
917
		old_errno = errno;
918
		lstat(buf, &st);
918
		lstat(buf, &st);
919
919
Lines 935-949 Link Here
935
		}
935
		}
936
936
937
		errno = old_errno;
937
		errno = old_errno;
938
	}
938
	} else if (errno != 0) {
939
939
940
	/* Make sure we do not return garbage if the current libc or kernel's
940
		/* Make sure we do not return garbage if the current libc or
941
	 * getcwd() is buggy.
941
		 * kernel's getcwd() is buggy.
942
	 */
942
		 */
943
	if (errno != 0) {
944
	  	if (tmpbuf)
945
			free(tmpbuf);
946
947
		return NULL;
943
		return NULL;
948
	}
944
	}
949
945

Return to bug 125701