[Bug ada/53996] New: [PATCH] fixed format string issue in /gcc/gcc/ada/gcc-interface/utils.c

ettl.martin at gmx dot de gcc-bugzilla@gcc.gnu.org
Tue Jul 17 13:05:00 GMT 2012


             Bug #: 53996
           Summary: [PATCH] fixed format string issue in
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: ada
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ettl.martin@gmx.de

Created attachment 27813
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27813
proposed patch

Please review the attached patch. It fixes a format string issue in file:

This patch replaces the format string in an sprintf expression from %d to %u:

      sprintf (type_name, "%sSIGNED_%d", unsignedp ? "UN" : "", precision);

because the variable precision is of type unsigned, which requires %u.

Best regards

Ettl Martin

More information about the Gcc-bugs mailing list