bugTutka - Bugs: bug #56291, Compile error on strncpy call in...

 
 

bug #56291: Compile error on strncpy call in conversion.cpp

Submitter:  Nil Geisweiller <ngeiswei>
Submitted:  Wed 08 May 2019 08:40:10 PM UTC
   
 
Category:  File Format Priority:  5 - Normal
Status:  Fixed Assigned to:  vesuri
Open/Closed:  Closed Release:  * 1.1.2
Operating System:  * GNU/Linux Planned Release:  1.1.3
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 05 Aug 2019 07:24:24 PM UTC, comment #1: 

Fixed in 6cf2a4721fcf691dc6a8feadcfa66988147c6ec9, released in 1.1.3.

Vesa Halttunen <vesuri>
Group administrator
Wed 08 May 2019 08:40:10 PM UTC, original submission:  

Compiling tutka on Fedora 29, gcc 8.3.1 generate the following error

=================================================================
conversion.cpp: In function ‘MMD2* songToMMD2(Song*)’:
conversion.cpp:422:20: error: ‘char* strncpy(char*, const char*, size_t)’ specified bound 32 equals destination size [-Werror=stringop-truncation]
             strncpy(PlaySeq->name, playseq->name().toLatin1().constData(), 32);
=================================================================

To fix it just replace 32 by 31.

Nil Geisweiller <ngeiswei>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by vesuri (Updated the item)
  • -email is unavailable- added by ngeiswei (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-08-05 vesuri Open/ClosedOpen Closed
    2019-08-05 vesuri CategoryNone File Format
        StatusNone Fixed
        Assigned toNone vesuri
        Planned ReleaseNone 1.1.3

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code