diff options
| author | @syxhe <https://t.me/syxhe> | 2025-01-06 21:04:27 -0600 |
|---|---|---|
| committer | @syxhe <https://t.me/syxhe> | 2025-01-06 21:04:27 -0600 |
| commit | 227bc3560762ae770564fcd8bad36b334696bb0b (patch) | |
| tree | 4bbc6ffea7036e979a701b7107ab1ef41b97e55d /src/encryption.c | |
| parent | f8e94a1179633799579a09dce1841f41e3b73f05 (diff) | |
sdptiny
Diffstat (limited to 'src/encryption.c')
| -rw-r--r-- | src/encryption.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/encryption.c b/src/encryption.c index e92e4e7..c74c07e 100644 --- a/src/encryption.c +++ b/src/encryption.c | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | #define _GNU_SOURCE | ||
| 2 | |||
| 1 | #include "encryption.h" | 3 | #include "encryption.h" |
| 2 | #include "shared.h" | 4 | #include "shared.h" |
| 3 | 5 | ||
| @@ -44,7 +46,10 @@ int maketmp(const char *dest, const char *format, ...) { | |||
| 44 | int main() { | 46 | int main() { |
| 45 | char *test = NULL; | 47 | char *test = NULL; |
| 46 | 48 | ||
| 47 | saprintf(&test, "We do a little trolling %d", 900); | 49 | // Turns out GNU did this for me, and I trust their code more than my own, so I'm using this now |
| 50 | if(asprintf(&test, "We do a little trolling %d", 900) < 0) | ||
| 51 | error(1, ENOMEM, "asprintf call failed"); | ||
| 52 | |||
| 48 | printf("%s\n", test); | 53 | printf("%s\n", test); |
| 49 | 54 | ||
| 50 | return 0; | 55 | return 0; |
