Search code examples
androidgoogle-playcocos2d-xlibpngandroid-security

COCOS2DX libpng Google Play Notification June 2016


I have received notification on my many apps on Google Play all developed in COCOS2DX, the Notification states that there is a security vulnerability in libpng, I am sure this is in cocos2dX because I haven't received them on games developed in AndEngine or Unity. We are using COCOS2DX version 2.2, 2.1.2 and 2.2.6 and we need to fix this ASAP Can any one suggest a solution for this problem? We cannot move to new COCOS2dX Version because we have many game so we need to fix the old version. Thanks


Solution

  • I have found a fix, and that is to extract the following zip file into your “cocos2dx\platform\third_party\android\prebuilt” folder:

    Download the fix from here: libpng_fix.zip for Cocos2d-x 2.x

    And change “Android.mk” file under “cocos2dx” folder:

    Change: LOCAL_WHOLE_STATIC_LIBRARIES := cocos_libpng_static

    to LOCAL_WHOLE_STATIC_LIBRARIES := cocos_libzlib_static LOCAL_WHOLE_STATIC_LIBRARIES += cocos_libpng_static

    Change: $(call import-module,libpng)

    to: $(call import-module,libzlib) $(call import-module,libpng)

    courtesy: Bengigi Apps and Games