Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

calloc() calls

Đang mở
#34 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
c
Lĩnh vực
devtools, embedded-iot

Hướng nghiên cứu

Start by searching the repository for calloc(sizeof(, especially the calls shown in src/jtag/drivers/ulink.c and src/target/nds32.c. Compare the current code with the upstream fix referenced in the issue, then verify that all affected calls use the intended argument order and that the relevant code still builds.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Hi,

correct me, if I'm wrong, but I found bunch of calls to calloc(), that seem to me to have bad order of arguments. The interface is void *calloc(size_t num, size_t size), but here is an example: tdo_buffer_start = calloc(sizeof(uint8_t), scan_size_bytes);.

At some locations there it is even combination of corrent and in-correct calls, like here.

Another locations can be easily found, when searching for calloc(sizeof(.

It is possible, it is just that I didn't look into the code deeper and more thoroughly, I indeed didn't, but...

EDIT: It seems this problem was fixed upstream about half year ago, so maybe it is somewhere in the queue already.

Ngôn ngữ chính
C
Star
202
Fork
57
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của STMicroelectronics/OpenOCD

Tất cả issue của STMicroelectronics/OpenOCD

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.