Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ccccff
void *memset_s(void \*v, int c, size_t n) {
	  volatile char *p = v;
	  while(n--)
		    *p++ = c;

	  return v;
}

void getPassword() {
	  char pwd\[64\];
	  if(GetPassword(pwd, sizeof(pwd))) {
		     /*checking of password, secure operations, etc \*/
	  }
	  pwd = memset_s(pwd, 0, sizeof(pwd));
}

...