[GRASS-dev] [GRASS GIS] #1315: DebCheck QA: Dangerous usage (strncpy doesn't always 0-terminate it)

#1315: DebCheck QA: Dangerous usage (strncpy doesn't always 0-terminate it)
-------------------------+--------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: Compiling | Version: 6.4.0
Keywords: r.support | Platform: Linux
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
(see #1311)

  * ./raster/r.support/modcolr/modcolr.c:44 [error] - Dangerous usage of
'name' (strncpy doesn't always 0-terminate it)
  * ./raster/r.support/modhist/modhist.c:45 [error] - Dangerous usage of
'name' (strncpy doesn't always 0-terminate it)

probably it is time to revisit the safe string copy/sprintf best practice
in the SUBMITTING file.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1315&gt;
GRASS GIS <http://grass.osgeo.org>

#1315: DebCheck QA: Dangerous usage (strncpy doesn't always 0-terminate it)
-------------------------+--------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.2
Component: Compiling | Version: 6.4.0
Keywords: r.support | Platform: Linux
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by hamish):

fixed in devbr6 with r50186. (r.support in trunk audited, repaired in
r50185)

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1315#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1315: DebCheck QA: Dangerous usage (strncpy doesn't always 0-terminate it)
-------------------------+--------------------------------------------------
Reporter: hamish | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Compiling | Version: 6.4.0
Keywords: r.support | Platform: Linux
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
Changes (by neteler):

  * milestone: 6.4.2 => 6.4.3

Comment:

Please backport if appropriate (perhaps we need to get rid of devbr6).

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1315#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1315: DebCheck QA: Dangerous usage (strncpy doesn't always 0-terminate it)
------------------------+---------------------------------------------------
  Reporter: hamish | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 6.4.3
Component: Compiling | Version: 6.4.0
Resolution: fixed | Keywords: r.support
  Platform: Linux | Cpu: Unspecified
------------------------+---------------------------------------------------
Changes (by hamish):

  * status: new => closed
  * resolution: => fixed

Comment:

backported to relbr64 by mmetz in r52903.

closing ticket,
Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1315#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>