]> andersk Git - gssapi-openssh.git/blobdiff - openssh/openbsd-compat/xmmap.c
merged OpenSSH 5.2p1 to trunk
[gssapi-openssh.git] / openssh / openbsd-compat / xmmap.c
index 322ffc2b17f6d9c2eec19a17d80468d67ba3083a..e0395e33f982919f2044581542f5d654cf19a787 100644 (file)
@@ -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);
This page took 0.036106 seconds and 4 git commands to generate.