This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53996

             Bug #: 53996
           Summary: [PATCH] fixed format string issue in
                    /gcc/gcc/ada/gcc-interface/utils.c
    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:
/gcc/gcc/ada/gcc-interface/utils.c


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]