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

httprsrv.c:857:3: note: ‘snprintf’ output between 11 and 138 bytes into a destination of size 128 #477

Closed
tizonia opened this issue Apr 4, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@tizonia
Copy link
Owner

commented Apr 4, 2018

Description

Making install in src
  CC       libtizhttpr_la-httpr.lo
  CC       libtizhttpr_la-httprcfgport.lo
  CC       libtizhttpr_la-httprmp3port.lo
  CC       libtizhttpr_la-httprsrv.lo
httprsrv.c: In function ‘srv_build_http_positive_response’:
httprsrv.c:844:64: warning: ‘%s’ directive output may be truncated writing up to 127 bytes into a region of size 119 [-Wformat-truncation=]
   snprintf (icyname_buffer, sizeof (icyname_buffer), "icy-name:%s\r\n",
                                                                ^~
httprsrv.c:844:3: note: ‘snprintf’ output between 12 and 139 bytes into a destination of size 128
   snprintf (icyname_buffer, sizeof (icyname_buffer), "icy-name:%s\r\n",
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             ap_server->mountpoint.station_name);
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
httprsrv.c:849:30: warning: ‘%s’ directive output may be truncated writing up to 127 bytes into a region of size 112 [-Wformat-truncation=]
             "icy-description:%s\r\n",
                              ^~
httprsrv.c:848:3: note: ‘snprintf’ output between 19 and 146 bytes into a destination of size 128
   snprintf (icydescription_buffer, sizeof (icydescription_buffer),
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             "icy-description:%s\r\n",
             ~~~~~~~~~~~~~~~~~~~~~~~~~
             ap_server->mountpoint.station_description);
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
httprsrv.c:853:67: warning: ‘%s’ directive output may be truncated writing up to 127 bytes into a region of size 118 [-Wformat-truncation=]
   snprintf (icygenre_buffer, sizeof (icygenre_buffer), "icy-genre:%s\r\n",
                                                                   ^~
httprsrv.c:853:3: note: ‘snprintf’ output between 13 and 140 bytes into a destination of size 128
   snprintf (icygenre_buffer, sizeof (icygenre_buffer), "icy-genre:%s\r\n",
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             ap_server->mountpoint.station_genre);
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
httprsrv.c:857:61: warning: ‘%s’ directive output may be truncated writing up to 127 bytes into a region of size 120 [-Wformat-truncation=]
   snprintf (icyurl_buffer, sizeof (icyurl_buffer), "icy-url:%s\r\n",
                                                             ^~
httprsrv.c:857:3: note: ‘snprintf’ output between 11 and 138 bytes into a destination of size 128
   snprintf (icyurl_buffer, sizeof (icyurl_buffer), "icy-url:%s\r\n",
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
             ap_server->mountpoint.station_url);
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC       libtizhttpr_la-httprprc.lo
  CCLD     libtizhttpr.la

Steps to Reproduce

Building from source on Ubuntu 18.04

Expected behavior:
No warnings expected

Actual behaviour:
Warnings are displayed

Reproduces how often:
100% under the specified conditions

Versions

'develop' branch

Installation Method Used

from source.

@tizonia tizonia added the bug label Apr 4, 2018

@tizonia tizonia added this to the v0.14.0 milestone Apr 4, 2018

@juanrubio juanrubio closed this in a0429c3 Apr 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.