This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
sonic-buildimage/src/systemd-sonic-generator
daxia16 8f16ff1124
Initialize pointer variable platform before use in get_num_of_asic (#12351)
- Why I did it
Pointer variable platform not initialized before use in get_num_of_asic of src/systemd-sonic-generator/systemd-sonic-generator.c. Then wild pointer will introduce undetermined exception when use in snprintf at line 545 .
Other pointers in this function like token will be assigned the value before use, and will not have such issue.

- How I did it
Initialized pointer platform to NULL when defined and before use.
2022-11-14 11:41:13 -08:00
..
debian Ported Marvell armhf build on amd64 host for debian buster to use cross-comp… (#8035) 2022-07-21 14:15:16 -07:00
tests/testfiles [multi-asic] Fixed systemd-sonic-generator for multi-asic (#7954) 2021-07-07 17:14:21 -07:00
.gitignore [multi-asic] Fixed systemd-sonic-generator for multi-asic (#7954) 2021-07-07 17:14:21 -07:00
Makefile Ported Marvell armhf build on amd64 host for debian buster to use cross-comp… (#8035) 2022-07-21 14:15:16 -07:00
ssg-test.cc [multi-asic] Fixed systemd-sonic-generator for multi-asic (#7954) 2021-07-07 17:14:21 -07:00
systemd-sonic-generator.c Initialize pointer variable platform before use in get_num_of_asic (#12351) 2022-11-14 11:41:13 -08:00
systemd-sonic-generator.h [multi-asic] Fixed systemd-sonic-generator for multi-asic (#7954) 2021-07-07 17:14:21 -07:00