Comments (5)
字符串的话,是否要修改成:sizeof是否要-1:
#define S2J_STRUCT_GET_string_ELEMENT(to_struct, from_json, _element) \
json_temp = cJSON_GetObjectItem(from_json, #_element); \
if (json_temp) strncpy((to_struct)->_element, json_temp->valuestring,sizeof((to_struct)->_element) -1 );
from struct2json.
CVE-2020-29203 was assigned to this issue.
from struct2json.
Thanks for your feedback, can you submit a PR for it?
from struct2json.
Thanks for your feedback, can you submit a PR for it?
It's my first time to submit a PR, so please check my work carefully...And thank you for giving me this chance!
from struct2json.
Thanks for your feedback, can you submit a PR for it?
It's my first time to submit a PR, so please check my work carefully...And thank you for giving me this chance!
Good job.
Thank you for your contribution, PR has been merged
from struct2json.
Related Issues (16)
- 关于结构体数组的嵌套 HOT 2
- 结构体的成员是 结构体数组 如何转换 HOT 3
- strncpy length? HOT 1
- 是否支持UTF-8字符咯? HOT 2
- error: redeclaration of ‘json_temp’ with no linkage cJSON *json_temp;
- 资源占用情况 HOT 1
- 结构体中存在枚举类型如何处理 HOT 1
- create缺少对应的delete方法 HOT 1
- 代码运行可靠吗?可以运行在项目中吗
- 用 clang 提取头文件中的结构体定义信息 HOT 1
- 整数转换的结果,打印显示 ld HOT 2
- 保存json数据到文件 HOT 2
- cJSON_Print 返回的指针地址为NULL HOT 6
- 结构体数组如何序列化? HOT 10
- 关于编译器warring HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from struct2json.