Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Secure ,Portable char array functions ?

Secure ,Portable char array functions ?

Scheduled Pinned Locked Moved C / C++ / MFC
c++data-structuresquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VC_RYK
    wrote on last edited by
    #1

    HI, Is there a standard/Portable equivalent functions for MSVC++ functions like : strncpy_s(), strcpy_s(), _stricmp(), strcat_s(), sprintf_s(), fopen_s() etc. I am porting a VC6 application to VC8, and getting tones of warnings regarding non-secure functions. I want to replace the non-secure functions with secure ones. But, till now i have not been able to find a portable solutions. I want a portable solution as some part of my app. connects with unix while others with windows. Thanks in advance.

    L A D 3 Replies Last reply
    0
    • V VC_RYK

      HI, Is there a standard/Portable equivalent functions for MSVC++ functions like : strncpy_s(), strcpy_s(), _stricmp(), strcat_s(), sprintf_s(), fopen_s() etc. I am porting a VC6 application to VC8, and getting tones of warnings regarding non-secure functions. I want to replace the non-secure functions with secure ones. But, till now i have not been able to find a portable solutions. I want a portable solution as some part of my app. connects with unix while others with windows. Thanks in advance.

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      you could easily create those functions yourself from scratch (for the simpler ones), or create a safety wrapper around existing unsafe ones (for the more complex ones, mainly the I/O functions). :)

      Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum

      Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.

      1 Reply Last reply
      0
      • V VC_RYK

        HI, Is there a standard/Portable equivalent functions for MSVC++ functions like : strncpy_s(), strcpy_s(), _stricmp(), strcat_s(), sprintf_s(), fopen_s() etc. I am porting a VC6 application to VC8, and getting tones of warnings regarding non-secure functions. I want to replace the non-secure functions with secure ones. But, till now i have not been able to find a portable solutions. I want a portable solution as some part of my app. connects with unix while others with windows. Thanks in advance.

        A Offline
        A Offline
        Alain Rist
        wrote on last edited by
        #3

        See my answer to your same question here[^], and please do not cross-post. AR

        When the wise (person) points at the moon the fool looks at the finger (Chinese proverb)

        V 1 Reply Last reply
        0
        • A Alain Rist

          See my answer to your same question here[^], and please do not cross-post. AR

          When the wise (person) points at the moon the fool looks at the finger (Chinese proverb)

          V Offline
          V Offline
          VC_RYK
          wrote on last edited by
          #4

          I reposted "here" because i did not get any response "there" even after 2 days.

          1 Reply Last reply
          0
          • V VC_RYK

            HI, Is there a standard/Portable equivalent functions for MSVC++ functions like : strncpy_s(), strcpy_s(), _stricmp(), strcat_s(), sprintf_s(), fopen_s() etc. I am porting a VC6 application to VC8, and getting tones of warnings regarding non-secure functions. I want to replace the non-secure functions with secure ones. But, till now i have not been able to find a portable solutions. I want a portable solution as some part of my app. connects with unix while others with windows. Thanks in advance.

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            VC_RYK wrote:

            I want a portable solution as some part of my app. connects with unix while others with windows.

            What functions you use in your code and what systems your code talks to are mutually exclusive. In other words, you can use whatever code you want and be able to talk to Windows, Unix, Mac, OS400, etc.

            "One man's wage rise is another man's price increase." - Harold Wilson

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            "Man who follows car will be exhausted." - Confucius

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups