p11-glue / p11-kit

Provides a way to load and enumerate PKCS#11 modules.
https://p11-glue.github.io/p11-glue/p11-kit.html
Other
149 stars 91 forks source link

log: Avoid buffer overflow #628

Closed Jakuje closed 5 months ago

Jakuje commented 5 months ago

There was attempt to fix this in bb3a3cb1, but it fixed only the case when this value was actually provided by the token. When the token does not support clock, it would print behind the "" buffer, causing random constant string to be printed instead of the actual value, for example

utcTime: ../common/attrs

This simplifies the long line for readability and prints additional information about this value being unsupported by the token.

coveralls commented 5 months ago

Coverage Status

coverage: 69.526% (-0.02%) from 69.548% when pulling fe6ca3ec6f8ac02a85af557ed24ec543c75d4df1 on Jakuje:utcTime into ebfc19c741c7399c2bd48133d3bdf2c70a7b5b0e on p11-glue:master.