diff options
-rw-r--r-- | lib/libpam.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libpam.c b/lib/libpam.c index ab75fab6..b890434e 100644 --- a/lib/libpam.c +++ b/lib/libpam.c @@ -227,12 +227,11 @@ allocPamRow(const struct pam * const pamP) { overflow will not occur in our calculations. NOTE: pnm_readpaminit() ensures this assumption is valid. -----------------------------------------------------------------------------*/ - /* The tuple row data structure starts with 'width' pointers to - the tuples, immediately followed by the 'width' tuples - themselves. Each tuple consists of 'depth' samples. + /* The tuple row data structure starts with pointers to the tuples, + immediately followed by the tuples themselves. */ - int const bytesPerTuple = allocationDepth(pamP) * sizeof(sample); + unsigned int const bytesPerTuple = allocationDepth(pamP) * sizeof(sample); tuple * tuplerow; tuplerow = malloc(pamP->width * (sizeof(tuple *) + bytesPerTuple)); |