Public bug reported: libmng version: 2.0.2
In file libmng_pixels.c, there are many functions; those are performing bit format conversion (8bit format to 16 bit, 16bit to 8bit etc.). For format conversion function are doing logical ANDing with Constant that is not logically correct. e.g. At #15692: *(pDstline+1) = (mng_uint8)(iR && 0xFF); In above example due to Logical ANDing(&&) in place of bitwise ANDing(&) there is a loss of information stored in LSB’s of iR. Now, Replaced logical ANDing operator (&&) with bitwise ANDing operator(&) After correction: At #15692: *(pDstline+1) = (mng_uint8)(iR & 0xFF); Many similar changes are applied in libmng_pixel.c, For detail information please check the attached patch file. ** Affects: libmng (Ubuntu) Importance: Undecided Status: New ** Patch added: "libmng_pixels.patch" https://bugs.launchpad.net/bugs/1472523/+attachment/4426207/+files/libmng_pixels.patch -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to libmng in Ubuntu. https://bugs.launchpad.net/bugs/1472523 Title: logical AND with Constant is not logically correct Status in libmng package in Ubuntu: New Bug description: libmng version: 2.0.2 In file libmng_pixels.c, there are many functions; those are performing bit format conversion (8bit format to 16 bit, 16bit to 8bit etc.). For format conversion function are doing logical ANDing with Constant that is not logically correct. e.g. At #15692: *(pDstline+1) = (mng_uint8)(iR && 0xFF); In above example due to Logical ANDing(&&) in place of bitwise ANDing(&) there is a loss of information stored in LSB’s of iR. Now, Replaced logical ANDing operator (&&) with bitwise ANDing operator(&) After correction: At #15692: *(pDstline+1) = (mng_uint8)(iR & 0xFF); Many similar changes are applied in libmng_pixel.c, For detail information please check the attached patch file. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libmng/+bug/1472523/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp