X-Git-Url: http://andersk.mit.edu/gitweb/gssapi-openssh.git/blobdiff_plain/2056e015b79f9ac007dbdcd54b09fbb9b13541b7..91d9cdd3ca06d1809bc05a285dafdea2954850b2:/openssh/openbsd-compat/xmmap.c diff --git a/openssh/openbsd-compat/xmmap.c b/openssh/openbsd-compat/xmmap.c index 322ffc2..e0395e3 100644 --- a/openssh/openbsd-compat/xmmap.c +++ b/openssh/openbsd-compat/xmmap.c @@ -71,7 +71,8 @@ xmmap(size_t size) fatal("mkstemp(\"%s\"): %s", MM_SWAP_TEMPLATE, strerror(errno)); unlink(tmpname); - ftruncate(tmpfd, size); + if (ftruncate(tmpfd, size) != 0) + fatal("%s: ftruncate: %s", __func__, strerror(errno)); address = mmap(NULL, size, PROT_WRITE|PROT_READ, MAP_SHARED, tmpfd, (off_t)0); close(tmpfd);