GNOME Bugzilla – Bug 796293
Fix null pointer check accidentally disabled
Last modified: 2018-08-22 16:39:17 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...
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
This enhancement was included in the GParted 0.32.0 release on August 22, 2018.