Ignore:
Timestamp:
09/06/16 12:59:48 (8 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-8953

Ready for Test: Yes

Interface Changes: Yes/No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description:

Fixed wrong string copy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/external-alma/atnf/PKSIO/NROFITSDataset.cc

    r3066 r3103  
    849849  string str24( 24, ' ' ) ;
    850850
    851   strcpy( record_->LSFIL, str4.c_str() ) ;
     851  for (auto i = 0u; i < 4u; ++i) {
     852    record_->LSFIL[i] = ' ';
     853  }
    852854  status = readTable( record_->LSFIL, "LSFIL", 4, i ) ;
    853855  if ( status ) {
     
    878880  //cout << "LAVST(" << i << ") = " << record_->LAVST << endl ;
    879881  //
    880   strcpy( record_->SCANTP, str8.c_str() ) ;
     882  for (auto i = 0u; i < 8u; ++i) {
     883    record_->SCANTP[i] = ' ';
     884  }
    881885    status = readTable( record_->SCANTP, "SCNTP", strlen(record_->SCANTP), i ) ;
    882886  if ( status ) {
     
    993997  //cout << "YY(" << i << ") = " << record_->YY << endl ;
    994998  //
    995   strcpy( record_->ARRYT, str4.c_str() ) ;
    996   status = readTable( record_->ARRYT, "ARRYT", strlen(record_->ARRYT), i ) ;
    997   for (int j = strlen(record_->ARRYT)-1 ; j >= 0 ; j--) {
     999  for (auto i = 0u; i < 4u; ++i) {
     1000    record_->ARRYT[i] = ' ';
     1001  }
     1002  status = readTable( record_->ARRYT, "ARRYT", 4, i ) ;
     1003  for (int j = 3 ; j >= 0 ; j--) {
    9981004    if (record_->ARRYT[j] == ' ') record_->ARRYT[j] = '\0';
    9991005    else break;
Note: See TracChangeset for help on using the changeset viewer.