Changeset d1b70d4


Ignore:
Timestamp:
Jan 21, 2021, 10:18:50 PM (8 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast-unique-expr
Children:
62c0f8a
Parents:
ea561c9
Message:

fix 32-bit memcpy size problem for stdlib fill

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/stdlib.hfa

    rea561c9 rd1b70d4  
    1010// Created On       : Thu Jan 28 17:12:35 2016
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jan 18 21:51:13 2021
    13 // Update Count     : 569
     12// Last Modified On : Thu Jan 21 22:02:13 2021
     13// Update Count     : 574
    1414//
    1515
     
    195195                                #pragma GCC diagnostic push
    196196                                #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
    197                                 memcpy( (char *)ptr + i, &Fill.t, sizeof(Fill.t) );
     197                                assert( size <= sizeof(Fill.t) );
     198                                memcpy( (char *)ptr + i, &Fill.t, size );
    198199                                #pragma GCC diagnostic pop
    199200                        }
Note: See TracChangeset for help on using the changeset viewer.