changeset 140:33d6bb570dcb src

one additional sanity check on the part number
author mroi
date Sun, 30 Mar 2003 10:57:14 +0000
parents f7a26cd00c93
children 8f63f4c25f2f
files navigation.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/navigation.c	Sat Mar 29 14:16:28 2003 +0000
+++ b/navigation.c	Sun Mar 30 10:57:14 2003 +0000
@@ -153,6 +153,12 @@
     pthread_mutex_unlock(&this->vm_lock);
     return S_ERR;
   }
+  if((part < 1) || (part > this->vm->vmgi->tt_srpt->title[title-1].nr_of_ptts)) {
+    printerr("Part out of range.");
+    pthread_mutex_unlock(&this->vm_lock);
+    return S_ERR;
+  }
+
   retval = vm_jump_title_part(this->vm, title, part);
   if (retval)
     this->vm->hop_channel++;