IBM Support

IT21772: INCORRECT LENGTH FOR SQL_LOCAL_LEN AND SQL_CODESET_LEN ON AIX

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • SQL_LOCAL_LEN and SQL_CODESET_LEN are too short on AIX. This
    causes memory corruption when used to calling DB2 APIs like
    db2CfgGet().
    

Local fix

  • Instead of using:
    
    char territory[SQL_LOCALE_LEN+1] = "terr";
    char codeset[SQL_CODESET_LEN+1] = "codeset";
    
    Manually change the lengths to:
    
    char territory[33+1] = "terr";
    char codeset[17+1] = "codeset";
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Developing application to call DB2 APIs on AIX               *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * First fixed in v11.1 M4 FP5. This will not be fixed in v10.5 *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Apply v10.5 FP 10 to the system where the application is     *
    * being developed.                                             *
    ****************************************************************
    

Problem conclusion

  • Apply v11.1 M4 FP5. Apply fix to the system where the
    application is being developed
    

Temporary fix

  • See LOCAL FIX.
    

Comments

APAR Information

  • APAR number

    IT21772

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    A50

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-08-03

  • Closed date

    2019-10-31

  • Last modified date

    2019-10-31

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    IT30802 IT30803

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"10.5","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
31 October 2019