1
0
mirror of https://github.com/fumiama/android-base16384.git synced 2026-06-07 19:40:39 +08:00
1. 修复指针越界
2. 修复整数溢出
3. 修复内存泄漏
This commit is contained in:
fumiama
2021-10-29 00:22:29 +08:00
parent 7ff9e835f3
commit 54e8403004
21 changed files with 132 additions and 119 deletions

View File

@@ -19,8 +19,8 @@ struct LENDAT {
};
typedef struct LENDAT LENDAT;
extern "C" LENDAT* encode(const uint8_t* data, const u_int32_t len);
extern "C" LENDAT* decode(const uint8_t* data, const u_int32_t len);
extern "C" LENDAT* encode(const uint8_t* data, const uint32_t len);
extern "C" LENDAT* decode(const uint8_t* data, const uint32_t len);
#endif
#ifdef CPUBIT64
#define B14BUFSIZ 16384
@@ -30,8 +30,8 @@ struct LENDAT {
};
typedef struct LENDAT LENDAT;
extern "C" LENDAT* encode(const uint8_t* data, const u_int64_t len);
extern "C" LENDAT* decode(const uint8_t* data, const u_int64_t len);
extern "C" LENDAT* encode(const uint8_t* data, const uint64_t len);
extern "C" LENDAT* decode(const uint8_t* data, const uint64_t len);
#endif
extern "C" int encode_file(const char* input, const char* output);