about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2006-09-03 18:44:18 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2006-09-03 18:44:18 +0000
commit4e8845e7b05502daf5c399b319cfbcd05dcc77a2 (patch)
tree8cac7f3ee8acc56db74a7f08aefc26d0917f2564 /lib
parent1ed657ab47b52d0c51e7fe8dab07093281ac9cc5 (diff)
downloadnetpbm-mirror-4e8845e7b05502daf5c399b319cfbcd05dcc77a2.tar.gz
netpbm-mirror-4e8845e7b05502daf5c399b319cfbcd05dcc77a2.tar.xz
netpbm-mirror-4e8845e7b05502daf5c399b319cfbcd05dcc77a2.zip
Release 10.35.02
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@34 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib')
-rw-r--r--lib/libpam.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libpam.c b/lib/libpam.c
index bbfa7e32..6d2acba7 100644
--- a/lib/libpam.c
+++ b/lib/libpam.c
@@ -1074,7 +1074,7 @@ pm_feed_from_pamtuples(int    const pipeToFeedFd,
     outpam.file = fdopen(pipeToFeedFd, "w");
 
     /* The following signals (and normally kills) the process with
-       SIGPIPE if the pipe does not take all 'inputLength' bytes.
+       SIGPIPE if the pipe does not take all the data.
     */
     pnm_writepam(&outpam, *inputTuplesP->tuplesP);
 
@@ -1089,10 +1089,11 @@ pm_accept_to_pamtuples(int    const pipeToSuckFd,
 
     struct pamtuples * const outputTuplesP = accepterParm;
 
-    struct pam inpam;
+    struct pam * const inpamP = outputTuplesP->pamP;
 
     *outputTuplesP->tuplesP =
-        pnm_readpam(fdopen(pipeToSuckFd, "r"), &inpam, sizeof(inpam));
+        pnm_readpam(fdopen(pipeToSuckFd, "r"), inpamP,
+                    PAM_STRUCT_SIZE(tuple_type));
 
-    pm_close(inpam.file);
+    pm_close(inpamP->file);
 }