mirror of
https://github.com/michaelrsweet/pdfio.git
synced 2024-12-27 05:48:20 +01:00
Fix some minor Coverity-reported issues (added a check to suppress a warning,
removed an unnecessary check, and removed some dead code)
This commit is contained in:
parent
b3ca129a58
commit
9014ab7a20
@ -222,6 +222,9 @@ _pdfioCryptoAESEncrypt(
|
|||||||
size_t outbytes = 0; // Output bytes
|
size_t outbytes = 0; // Output bytes
|
||||||
|
|
||||||
|
|
||||||
|
if (len == 0)
|
||||||
|
return (0);
|
||||||
|
|
||||||
if (inbuffer != outbuffer)
|
if (inbuffer != outbuffer)
|
||||||
{
|
{
|
||||||
// Not the most efficient, but we can optimize later - the sample AES code
|
// Not the most efficient, but we can optimize later - the sample AES code
|
||||||
|
@ -366,9 +366,7 @@ _pdfioArrayDelete(pdfio_array_t *a) // I - Array
|
|||||||
free(a->values[i].value.binary.data);
|
free(a->values[i].value.binary.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (a)
|
free(a->values);
|
||||||
free(a->values);
|
|
||||||
|
|
||||||
free(a);
|
free(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ _pdfioCryptoLock(
|
|||||||
}
|
}
|
||||||
|
|
||||||
pdfioDictSetName(filter_dict, "Type", "CryptFilter");
|
pdfioDictSetName(filter_dict, "Type", "CryptFilter");
|
||||||
pdfioDictSetName(filter_dict, "CFM", encryption == PDFIO_ENCRYPTION_RC4_128 ? "V2" : "AESV2");
|
pdfioDictSetName(filter_dict, "CFM", "AESV2");
|
||||||
pdfioDictSetDict(cf_dict, "PDFio", filter_dict);
|
pdfioDictSetDict(cf_dict, "PDFio", filter_dict);
|
||||||
pdfioDictSetDict(dict, "CF", cf_dict);
|
pdfioDictSetDict(dict, "CF", cf_dict);
|
||||||
pdfioDictSetName(dict, "StmF", "PDFio");
|
pdfioDictSetName(dict, "StmF", "PDFio");
|
||||||
|
Loading…
Reference in New Issue
Block a user