After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 796293 - Fix null pointer check accidentally disabled
Fix null pointer check accidentally disabled
Status: RESOLVED FIXED
Product: gparted
Classification: Other
Component: application
GIT HEAD
Other Linux
: Normal normal
: ---
Assigned To: gparted maintainers alias
gparted maintainers alias
Depends on:
Blocks:
 
 
Reported: 2018-05-21 02:22 UTC by Robert Ancell
Modified: 2018-08-22 16:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix null pointer check accidentally disabled (839 bytes, patch)
2018-05-21 02:22 UTC, Robert Ancell
none Details | Review

Description Robert Ancell 2018-05-21 02:22:00 UTC
Created attachment 372269 [details] [review]
Fix null pointer check accidentally disabled

PasswordRAMStore.cc: In member function ‘void GParted::PWStore::erase_all()’:
PasswordRAMStore.cc:177:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  if ( protected_mem != NULL );
  ^~
PasswordRAMStore.cc:193:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
   memset( protected_mem, '\0', ProtectedMemSize );
   ^~~~~~

Looks like a stray semicolon...
Comment 1 Mike Fleetwood 2018-05-21 12:45:54 UTC
Hi Robert,

Thank you for catching my bug and providing a patch.  I've just added
the compiler warning to the commit message.  Your patch has been
commited to upstream git repo ready for inclusion in the next release of
GParted.

Fix null pointer check accidentally disabled (#796293)
https://git.gnome.org/browse/gparted/commit/?id=2d853b46c1c3b1cad66c13d6f9ad921cd9d78977

Mike
Comment 2 Curtis Gedak 2018-08-22 16:39:17 UTC
This enhancement was included in the GParted 0.32.0 release on August 22, 2018.