blob: 418a8321d1d022f10131dd08cc68f892b2854174 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
From 8b49d06375685d4dc0ddd71a9b7310663dc92d51 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Mon, 24 Feb 2014 11:25:28 +0100
Subject: [PATCH] b64: fix segfault caused by signed char
---
lua-b64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lua-b64.c b/lua-b64.c
index ce74481..cb03f4f 100644
--- a/lua-b64.c
+++ b/lua-b64.c
@@ -28,7 +28,7 @@ static const char *urlsafe_base64_tbl =
static int b64_encode_tbl(lua_State *L, const char *tbl)
{
size_t len, n = 0;
- const char *src = luaL_checklstring(L, 1, &len);
+ const unsigned char *src = (const unsigned char *)luaL_checklstring(L, 1, &len);
luaL_Buffer dst;
unsigned int triplet = 0;
unsigned int pad;
--
1.8.5.4
|