Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

calloc() calls

Aperta
#34 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
c

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
C
Stelle
202
Fork
57
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di STMicroelectronics/OpenOCD

Tutte le issue di STMicroelectronics/OpenOCD

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.