[Desktop-packages] [Bug 1512617] [NEW] Redundant Comparison in libmng_zlib.c

2015-11-03 Thread Garima
Public bug reported:

In libmng_zlib.c
At #368, 'iRslt' == '0' is checked. 
So, it is redundant comparison 'iRslt' == '0' (0 == 0) which is always true at 
#373, #379, #382, #385 and #388.

The solution is to remove 'iRslt' == '0' comparison.

For detail information please check the attached patch file.

** Affects: libmng (Ubuntu)
 Importance: Undecided
 Status: New

** Patch added: "Redundant Comparision in libmng_zlib.c"
   
https://bugs.launchpad.net/bugs/1512617/+attachment/4511878/+files/redundant_comparison_libmng_zlib.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/1512617

Title:
  Redundant Comparison in libmng_zlib.c

Status in libmng package in Ubuntu:
  New

Bug description:
  In libmng_zlib.c
  At #368, 'iRslt' == '0' is checked. 
  So, it is redundant comparison 'iRslt' == '0' (0 == 0) which is always true 
at #373, #379, #382, #385 and #388.

  The solution is to remove 'iRslt' == '0' comparison.

  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/1512617/+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


[Desktop-packages] [Bug 1501265] [NEW] unchecked function return value

2015-09-30 Thread Garima
Public bug reported:

At libmng_display.c:3256
Return value of a function 'mng_reset_object_details' is not captured in other 
variable and is not checked.

The solution is to capture return value of 'mng_reset_object_details' in 
iRetcode 
if (iRetcode)
  return;

At libmng_display.c:3540
Return value of a function 'load_bkgdlayer'is not captured in other variable 
and is not checked.

The solution is to capture return value of 'load_bkgdlayer'in iRetcode 
if (iRetcode)
  return;

At libmng_hlapi.c:1434
Return value of a function 'mng_process_eof' is not captured in other variable 
and is not checked.

The solution is to capture return value of 'mng_process_eof' in iRetcode 
if (iRetcode)
  return;

For detail information please check the attached patch file.

** Affects: libmng (Ubuntu)
 Importance: Undecided
 Status: New

** Attachment added: "UNCHECKED_FUNC.patch"
   
https://bugs.launchpad.net/bugs/1501265/+attachment/4479766/+files/UNCHECKED_FUNC.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/1501265

Title:
  unchecked function return value

Status in libmng package in Ubuntu:
  New

Bug description:
  At libmng_display.c:3256
  Return value of a function 'mng_reset_object_details' is not captured in 
other variable and is not checked.

  The solution is to capture return value of 'mng_reset_object_details' in 
iRetcode 
  if (iRetcode)
return;

  At libmng_display.c:3540
  Return value of a function 'load_bkgdlayer'is not captured in other variable 
and is not checked.

  The solution is to capture return value of 'load_bkgdlayer'in iRetcode 
  if (iRetcode)
return;

  At libmng_hlapi.c:1434
  Return value of a function 'mng_process_eof' is not captured in other 
variable and is not checked.

  The solution is to capture return value of 'mng_process_eof' in iRetcode 
  if (iRetcode)
return;

  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/1501265/+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


[Desktop-packages] [Bug 1501261] [NEW] redundant comparison libmng_chunk_io.c

2015-09-30 Thread Garima
Public bug reported:

check on variable iRawlen is redundant at some places in
libmng_chunk_io.c

At #3850: Redundant comparison '(5 <= iRawlen)' is always 'true' because it is 
already checked at #3775.
At #6346: Redundant comparison '(0 != iRawlen)'  is always 'true' because it is 
already checked at #6323.
At #3407: Redundant comparison '(0 != iRawlen)'  is always 'true' because it is 
already checked at #6380.

For detail information please check the attached patch file.

** Affects: libmng (Ubuntu)
 Importance: Undecided
 Status: New

** Patch added: "redundant_comparison.patch"
   
https://bugs.launchpad.net/bugs/1501261/+attachment/4479765/+files/redundant_comparison.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/1501261

Title:
  redundant comparison libmng_chunk_io.c

Status in libmng package in Ubuntu:
  New

Bug description:
  check on variable iRawlen is redundant at some places in
  libmng_chunk_io.c

  At #3850: Redundant comparison '(5 <= iRawlen)' is always 'true' because it 
is already checked at #3775.
  At #6346: Redundant comparison '(0 != iRawlen)'  is always 'true' because it 
is already checked at #6323.
  At #3407: Redundant comparison '(0 != iRawlen)'  is always 'true' because it 
is already checked at #6380.

  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/1501261/+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


[Desktop-packages] [Bug 1472523] Re: logical AND with Constant is not logically correct

2015-07-08 Thread Garima
** Description changed:

- libmng version: 2.0.2
+ libmng version: 2.0.3
  
  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.

-- 
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.3

  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


[Desktop-packages] [Bug 1472523] [NEW] logical AND with Constant is not logically correct

2015-07-08 Thread Garima
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