Skip to content

test #3

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ on:

jobs:
analyze:
if: github.repository_owner == 'sonic-net'
name: Analyze
runs-on: ubuntu-latest
permissions:
Expand Down
13 changes: 13 additions & 0 deletions src/iccpd/src/iccp_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@
/*
* 'id <1-65535>' command
*/

#define SIZE 30

int f(char * s) {
char buf[20]; //buf not set to use SIZE macro

strncpy(buf, s, SIZE); //wrong: copy may exceed size of buf

for (int i = 0; i < SIZE; i++) { //wrong: upper limit that is higher than array size
cout << array[i];
}
}

int set_mc_lag_id( struct CSM *csm, uint16_t id)
{
if (!csm)
Expand Down