Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

asn1_get_string uses buffer where *buffer is expected #2665

Closed

Description

@michaelrsweet

Version: 1.3.4
CUPS.org User: yannickmoy

From the patch for STR #2589, I run my analyzer on the code, and buffer is used where *buffer should be, in the last case, when the string is larger than the buffer.

if (length < strsize)
{
memcpy(string, *buffer, length);
string[length] = '\0';
}
else
{
memcpy(string, buffer, strsize - 1); <<<<<< HERE
string[strsize - 1] = '\0';
}

(*buffer) += length;

Activity

  1. michaelrsweet commented on Jan 10, 2008

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Fixed in Subversion repository.

  2. added this to the Stable milestone on Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions