summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
42bcfe2)
Author: noodles
Date: 2002/11/13 19:25:44
Fix off by one bug in armor routine (we'd print NULLs in the header/footer).
/*
* Print armor header
*/
/*
* Print armor header
*/
- putchar_func(ctx, sizeof("-----BEGIN PGP PUBLIC KEY BLOCK-----\n"),
+ putchar_func(ctx, sizeof("-----BEGIN PGP PUBLIC KEY BLOCK-----\n") - 1,
(unsigned char *) "-----BEGIN PGP PUBLIC KEY BLOCK-----\n");
(unsigned char *) "-----BEGIN PGP PUBLIC KEY BLOCK-----\n");
- putchar_func(ctx, sizeof("Version: onak " VERSION "\n\n"),
+ putchar_func(ctx, sizeof("Version: onak " VERSION "\n\n") - 1,
(unsigned char *) "Version: onak " VERSION "\n\n");
armor_init(&armor_ctx);
(unsigned char *) "Version: onak " VERSION "\n\n");
armor_init(&armor_ctx);
/*
* Print armor footer
*/
/*
* Print armor footer
*/
- putchar_func(ctx, sizeof("-----END PGP PUBLIC KEY BLOCK-----\n"),
+ putchar_func(ctx, sizeof("-----END PGP PUBLIC KEY BLOCK-----\n") - 1,
(unsigned char *) "-----END PGP PUBLIC KEY BLOCK-----\n");
return 0;
(unsigned char *) "-----END PGP PUBLIC KEY BLOCK-----\n");
return 0;