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

websocket.c:308:2: note: ‘snprintf’ output between 9 and 263 bytes into a destination of size 256 #88

Open
victor-shelepen opened this issue Jul 21, 2022 · 0 comments

Comments

@victor-shelepen
Copy link

I am building the project from sources. During compilation I receive the following output:

[ 47%] Building C object CMakeFiles/signalwire_client.dir/src/transport/websocket.c.o
/usr/local/src/signalwire-c/src/transport/websocket.c: In function ‘__connect_socket’:
/usr/local/src/signalwire-c/src/transport/websocket.c:308:36: warning: ‘:swclt’ directive output may be truncated writing 6 bytes into a region of size between 0 and 254 [-Wformat-truncation=]
  308 |  snprintf(buf, sizeof(buf), "/%s:%s:swclt", ctx->info.path, ctx->info.address);
      |                                    ^~~~~~
/usr/local/src/signalwire-c/src/transport/websocket.c:308:2: note: ‘snprintf’ output between 9 and 263 bytes into a destination of size 256
  308 |  snprintf(buf, sizeof(buf), "/%s:%s:swclt", ctx->info.path, ctx->info.address);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 50%] Linking C shared library libsignalwire_client.so
[ 50%] Built target signalwire_client
Scanning dependencies of target swclt_bench
[ 52%] Building C object swclt_bench/CMakeFiles/swclt_bench.dir/main.c.o
[ 55%] Linking C executable swclt_bench
[ 55%] Built target swclt_bench
[ 57%] Generating C unity source swclt_test/cotire/swclt_test_C_unity.c
[ 60%] Generating C prefix source swclt_test/cotire/swclt_test_C_prefix.c
[ 63%] Generating C prefix header swclt_test/cotire/swclt_test_C_prefix.h
[ 65%] Building C precompiled header swclt_test/cotire/swclt_test_C_prefix.h.gch
Scanning dependencies of target swclt_test
[ 68%] Building C object swclt_test/CMakeFiles/swclt_test.dir/cases/callback.c.o
[ 71%] Building C object swclt_test/CMakeFiles/swclt_test.dir/cases/command.c.o

OS:

ubuntu@freeswitch:/usr/local/src/signalwire-c$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.4 LTS
Release:	20.04
Codename:	focal

I go through the following tutorial: Installing FreeSWITCH 1.10.X on Ubuntu 18.04 | Ubuntu 20.04 LTS

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

No branches or pull requests

1 participant