add: var re = new RegExp("^[0-9]+$"); if (!re.test(timeout)) { timeout = "0"; } 
context: function changePasswordSettings(){  var askTimes = 0;  var timeout = internal_token.getAskPasswordTimeout();  var radiogroup = document.getElementById("passwordAskTimes");  switch ( radiogroup.value ) {  case "0":     askTimes = nsIPK11Token.ASK_FIRST_TIME;    break;  case "1":     askTimes = nsIPK11Token.ASK_EVERY_TIME;    break;  case "2":     var timeoutField = document.getElementById("passwordTimeout");    timeout = timeoutField.value;    askTimes = nsIPK11Token.ASK_EXPIRE_TIME;    break;  }  internal_token.setAskPasswordDefaults(askTimes, timeout);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/5364e446c5c1fe63369fd1328eaeea0718b6f49e/pref-masterpass.js/buggy/security/manager/pki/resources/content/pref-masterpass.js