Bad Memset #230

Closed
opened 2026-01-29 16:38:33 +00:00 by claunia · 3 comments
Owner

Originally created by @sidgairo18 on GitHub (Jan 8, 2017).

Was it intended to use '0' i.e. asci value 48 or should it be just 0 - the decimal number ?

bad_memset: "memset" with fill value "'0'" (the zero character) in memset(filename + m, 48, strlen(num) - strlen(temp))

Originally created by @sidgairo18 on GitHub (Jan 8, 2017). Was it intended to use '0' i.e. asci value 48 or should it be just 0 - the decimal number ? bad_memset: "memset" with fill value "'0'" (the zero character) in `memset(filename + m, 48, strlen(num) - strlen(temp))`
Author
Owner

@cfsmp3 commented on GitHub (Jan 8, 2017):

Seems to be left padding a string with '0' so it's probably correct but what file is it?

@cfsmp3 commented on GitHub (Jan 8, 2017): Seems to be left padding a string with '0' so it's probably correct but what file is it?
Author
Owner

@sidgairo18 commented on GitHub (Jan 8, 2017):

File src/lib_ccx/params.c line 159.

@sidgairo18 commented on GitHub (Jan 8, 2017): File src/lib_ccx/params.c line 159.
Author
Owner

@cfsmp3 commented on GitHub (Jan 8, 2017):

This is what I have:
memset (filename+m,'0',strlen (num)-strlen (temp));

It's correct - we want '0', not 0.

@cfsmp3 commented on GitHub (Jan 8, 2017): This is what I have: memset (filename+m,'0',strlen (num)-strlen (temp)); It's correct - we want '0', not 0.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#230