Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-3008

fwrite on stream opened with open_memstream() truncates the buffer size

    • None
    • Important
    • 2
    • rhel-sst-pt-libraries
    • ssg_platform_tools
    • 5
    • False
    • Hide

      None

      Show
      None
    • No
    • SST PT Libraries Sprint 10, SST PT Libraries Sprint 11
    • None
    • None
    • Release Note Not Required
    • None

      Current output:

      """
      Running test: fopen()
      position after fwrite: 24
      position after SEEK_END: 24

      Running test: fmemopen()
      position after fwrite: 24
      position after SEEK_END: 24

      Running test: open_memstream()
      position after fwrite: 24
      position after SEEK_END: 4

      open_memstream() final buffer size: 4
      """

      Expected ouput:
      """
      Running test: fopen()
      position after fwrite: 24
      position after SEEK_END: 24

      Running test: fmemopen()
      position after fwrite: 24
      position after SEEK_END: 24

      Running test: open_memstream()
      position after fwrite: 24
      position after SEEK_END: 24

      open_memstream() final buffer size: 24
      """

      The seek to the start of the buffer, and write data smaller than
      the stream length truncates the memory stream.

              rhn-engineering-dj DJ Delorie
              rhn-support-pandrade Paulo Andrade
              Platform Tools - Libraries Bot Platform Tools - Libraries Bot
              Sergey Kolosov Sergey Kolosov
              Votes:
              1 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated:
                Resolved: