Quantcast
Channel: MPLAB XC32
Viewing all articles
Browse latest Browse all 1537

sprintf and malloc avoid crash (Superciuk)

$
0
0
Multithreaded app with ATSAMC21N-XPRO. Inside a callback sprintf does well with stack (i.e. char xxx). When I use malloc(i.e. char *xxx=(char*)malloc(30)) sprintf crashes app. The best I found is the last example for vsnprintf: char * make_message(const ..

Viewing all articles
Browse latest Browse all 1537

Trending Articles