[mythtv] [PATCH] MythVideo Priviledge Escalation Bug
DanM
dan at milkcarton.com
Tue Nov 25 22:59:24 EST 2003
Here's a simple patch for a simple bug I created with my last parental
control patch. Basicly, if you use the up or down arrows to change the
parental level, then hit esc when the pin box pops up, your priviledge
level gets upgraded because of how the piece of code was written (The
global var currentParentalLevel was incramented/deincremented and then
the pass was checked). This patch fixes that.
-dan.
-------------- next part --------------
Index: mythvideo/videobrowser.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythvideo/mythvideo/videobrowser.cpp,v
retrieving revision 1.20
diff -u -d -r1.20 videobrowser.cpp
--- mythvideo/videobrowser.cpp 16 Nov 2003 18:22:22 -0000 1.20
+++ mythvideo/videobrowser.cpp 26 Nov 2003 03:52:39 -0000
@@ -595,10 +595,7 @@
void VideoBrowser::cursorUp()
{
- currentParentalLevel++;
- if (currentParentalLevel > 4)
- currentParentalLevel = 4;
- setParentalLevel(currentParentalLevel);
+ setParentalLevel(currentParentalLevel + 1);
inData = 0;
RefreshMovieList();
SetCurrentItem();
@@ -608,10 +605,7 @@
void VideoBrowser::cursorDown()
{
- currentParentalLevel--;
- if (currentParentalLevel < 1)
- currentParentalLevel = 1;
- setParentalLevel(currentParentalLevel);
+ setParentalLevel(currentParentalLevel - 1);
inData = 0;
RefreshMovieList();
SetCurrentItem();
More information about the mythtv-dev
mailing list