Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make the unsafe truncating functions safe #52

Closed
rurban opened this issue Feb 25, 2018 · 0 comments
Closed

make the unsafe truncating functions safe #52

rurban opened this issue Feb 25, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@rurban
Copy link
Owner

rurban commented Feb 25, 2018

on truncation put a 0 at the end, shorten the length by -1. len is the size then.
snprintf_sm, vsnprintf_s, snwprintf_s, vsnwprintf_s

@rurban rurban self-assigned this Mar 1, 2018
@rurban rurban added this to the 3.3 milestone Mar 1, 2018
@rurban rurban added the bug label Mar 1, 2018
rurban added a commit that referenced this issue Mar 1, 2018
on truncation put a 0 at the end, shorten the length by -1.
len is the size then.
snprintf_sm, vsnprintf_s, snwprintf_s, vsnwprintf_s

See #52
rurban added a commit that referenced this issue Mar 1, 2018
on truncation put a 0 at the end, shorten the length by -1.
len is the size then.
snprintf_sm, vsnprintf_s, snwprintf_s, vsnwprintf_s

fix snprintf_s, vsnprintf_s for dmax==0: allow NULL dest then.
clear dest on errors after printing to it.
null slack at end of buffer.
fix documentation of snprintf_s

See #52
rurban added a commit that referenced this issue Mar 1, 2018
on truncation put a 0 at the end, shorten the length by -1.
len is the size then.
snprintf_sm, vsnprintf_s, snwprintf_s, vsnwprintf_s

fix snprintf_s, vsnprintf_s for dmax==0: allow NULL dest then.
clear dest on errors after printing to it.
null slack at end of buffer.
fix documentation of snprintf_s

See #52
rurban added a commit that referenced this issue Mar 1, 2018
on truncation put a 0 at the end, shorten the length by -1.
len is the size then.
snprintf_sm, vsnprintf_s, snwprintf_s, vsnwprintf_s

fix snprintf_s, vsnprintf_s: allow dmax==0
clear dest on errors after printing to it.
null slack at end of buffer.
fix documentation of snprintf_s.

See #52
rurban added a commit that referenced this issue Mar 1, 2018
guarantee null termination.
on truncation put a 0 at the end, shorten the length by -1.
len is the size then.
snprintf_sm, vsnprintf_s, snwprintf_s, vsnwprintf_s

fix snprintf_s, vsnprintf_s: allow dmax==0
clear dest on errors after printing to it.
null slack at end of buffer.
fix documentation of snprintf_s.

See #52
rurban added a commit that referenced this issue Mar 1, 2018
guarantee null termination.
on truncation put a 0 at the end, shorten the length by -1.
len is the size then.
snprintf_sm, vsnprintf_s, snwprintf_s, vsnwprintf_s

fix snprintf_s, vsnprintf_s: allow dmax==0
clear dest on errors after printing to it.
null slack at end of buffer.
fix documentation of snprintf_s.

See #52
rurban added a commit that referenced this issue Mar 1, 2018
guarantee null termination.
on truncation put a 0 at the end, shorten the length by -1.
len is the size then.
snprintf_sm, vsnprintf_s, snwprintf_s, vsnwprintf_s

fix snprintf_s, vsnprintf_s: allow dmax==0
clear dest on errors after printing to it.
null slack at end of buffer.
fix documentation of snprintf_s.

See #52
rurban added a commit that referenced this issue Mar 1, 2018
snprintf_sm, vsnprintf_s, snwprintf_s, vsnwprintf_s:
guarantee null termination.
on truncation put a 0 at the end, shorten the length by -1.
len is the size then.

clear dest on errors after printing to it.
null slack at end of buffer.
fix documentation of snprintf_s.

See #52
rurban added a commit that referenced this issue Mar 2, 2018
snprintf_sm, vsnprintf_s, snwprintf_s, vsnwprintf_s:
guarantee null termination.
on truncation put a 0 at the end, shorten the length by -1.
len is the size then.

clear dest on errors after printing to it.
null slack at end of buffer.
fix documentation of snprintf_s.

See #52
rurban added a commit that referenced this issue Mar 2, 2018
snprintf_sm, vsnprintf_s, snwprintf_s, vsnwprintf_s:
guarantee null termination.
on truncation put a 0 at the end, shorten the length by -1.
len is the size then.

clear dest on errors after printing to it.
null slack at end of buffer.
fix documentation of snprintf_s.

See #52
rurban added a commit that referenced this issue Mar 2, 2018
snprintf_sm, vsnprintf_s, snwprintf_s, vsnwprintf_s:
guarantee null termination.
on truncation put a 0 at the end, shorten the length by -1.
len is the size then.

clear dest on errors after printing to it.
null slack at end of buffer.
fix documentation of snprintf_s.

See #52
rurban added a commit that referenced this issue Mar 2, 2018
snprintf_sm, vsnprintf_s, snwprintf_s, vsnwprintf_s:
guarantee null termination.
on truncation put a 0 at the end, shorten the length by -1.
len is the size then.

clear dest on errors after printing to it.
null slack at end of buffer.
fix documentation of snprintf_s.

See #52
rurban added a commit that referenced this issue Mar 2, 2018
snprintf_sm, vsnprintf_s, snwprintf_s, vsnwprintf_s:
guarantee null termination.
on truncation put a 0 at the end, shorten the length by -1.
len is the size then.

clear dest on errors after printing to it.
null slack at end of buffer.
fix documentation of snprintf_s.

See #52
@rurban rurban closed this as completed Mar 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant