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

Use snprintf (instead of sprintf) #4295

Merged
merged 1 commit into from
May 17, 2024

Conversation

PoeticPete
Copy link
Contributor

snprintf is safer than sprintf. This change replaces all instances of sprintf with snprintf.

Tests pass

ctest -C Debug -j
Test project /Users/petertao/Desktop/fb/uncrustify/build
      Start  3: cpp
      Start 12: sources_format
      Start  2: c
      Start  8: objective-c
      Start  4: d
      Start  1: c-sharp
      Start  7: java
      Start  9: pawn
      Start 10: vala
      Start 13: cli_options
      Start 11: staging
      Start  5: ecma
      Start  6: imported
      Start 14: sanity
 1/14 Test #14: sanity ...........................   Passed    0.01 sec
 2/14 Test  #6: imported .........................   Passed    0.08 sec
 3/14 Test  #5: ecma .............................   Passed    0.25 sec
 4/14 Test #11: staging ..........................   Passed    0.77 sec
 5/14 Test #13: cli_options ......................   Passed    1.02 sec
 6/14 Test #10: vala .............................   Passed    4.41 sec
 7/14 Test  #9: pawn .............................   Passed    4.86 sec
 8/14 Test  #7: java .............................   Passed    7.68 sec
 9/14 Test  #1: c-sharp ..........................   Passed   21.47 sec
10/14 Test  #4: d ................................   Passed   40.15 sec
11/14 Test  #8: objective-c ......................   Passed   40.25 sec
12/14 Test #12: sources_format ...................   Passed   87.80 sec
13/14 Test  #2: c ................................   Passed   88.84 sec
14/14 Test  #3: cpp ..............................   Passed  133.27 sec

100% tests passed, 0 tests failed out of 14

Total Test time (real) = 133.30 sec

Copy link
Collaborator

@micheleCTDEAdmin micheleCTDEAdmin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks @PoeticPete

@micheleCTDEAdmin micheleCTDEAdmin merged commit a4cb495 into uncrustify:master May 17, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants