[SOLVED] Secure memcpy

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Hello Russ,

    Thank you for your inquiry.
    memcpy_s is a Microsoft extension to the standard library,
    there is no pendant to it in teh SEGGER Runtime Library.

    If required, we would recommend implementing a wrapper to memcpy()
    with all required security checks needed.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Hello,


    Masmiseim wrote:

    memcpy_s is standardized with C11, same with strcpy_s.
    Yes and no. Only the function name and parameters are defined. Not the function implementation itself.
    To best of our knowledge this is not implemented in standardlibs like glibc etc. either.
    We found only the implementation from Microsoft which OP references.

    So if you need the functionality now we recommend to write your own wrapper function for it.

    We will add it on our feature wish list but can't promise anything at this point.

    Best regards,
    Nino
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.