Andrew Geissler | 32b1199 | 2021-03-31 13:37:05 -0500 | [diff] [blame] | 1 | From ee03e265804a07a0da5028b86960031bd7ab86b2 Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Sat, 27 Mar 2021 22:01:13 -0700 |
| 4 | Subject: [PATCH] use BUFSIZ as buffer size |
| 5 | |
| 6 | Author: Jakub Wilk <jwilk@debian.org> |
| 7 | Bug: http://sourceforge.net/tracker/?func=detail&atid=785907&aid=3591336&group_id=152942 |
| 8 | |
| 9 | Upstream-Status: Pending |
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 11 | --- |
| 12 | include/b64/decode.h | 3 ++- |
| 13 | include/b64/encode.h | 3 ++- |
| 14 | 2 files changed, 4 insertions(+), 2 deletions(-) |
| 15 | |
| 16 | diff --git a/include/b64/decode.h b/include/b64/decode.h |
| 17 | index 12b16ea..e9019f3 100644 |
| 18 | --- a/include/b64/decode.h |
| 19 | +++ b/include/b64/decode.h |
| 20 | @@ -8,6 +8,7 @@ For details, see http://sourceforge.net/projects/libb64 |
| 21 | #ifndef BASE64_DECODE_H |
| 22 | #define BASE64_DECODE_H |
| 23 | |
| 24 | +#include <cstdio> |
| 25 | #include <iostream> |
| 26 | |
| 27 | namespace base64 |
| 28 | @@ -22,7 +23,7 @@ namespace base64 |
| 29 | base64_decodestate _state; |
| 30 | int _buffersize; |
| 31 | |
| 32 | - decoder(int buffersize_in = BUFFERSIZE) |
| 33 | + decoder(int buffersize_in = BUFSIZ) |
| 34 | : _buffersize(buffersize_in) |
| 35 | {} |
| 36 | |
| 37 | diff --git a/include/b64/encode.h b/include/b64/encode.h |
| 38 | index 5d807d9..e7a7035 100644 |
| 39 | --- a/include/b64/encode.h |
| 40 | +++ b/include/b64/encode.h |
| 41 | @@ -8,6 +8,7 @@ For details, see http://sourceforge.net/projects/libb64 |
| 42 | #ifndef BASE64_ENCODE_H |
| 43 | #define BASE64_ENCODE_H |
| 44 | |
| 45 | +#include <cstdio> |
| 46 | #include <iostream> |
| 47 | |
| 48 | namespace base64 |
| 49 | @@ -22,7 +23,7 @@ namespace base64 |
| 50 | base64_encodestate _state; |
| 51 | int _buffersize; |
| 52 | |
| 53 | - encoder(int buffersize_in = BUFFERSIZE) |
| 54 | + encoder(int buffersize_in = BUFSIZ) |
| 55 | : _buffersize(buffersize_in) |
| 56 | {} |
| 57 | |