Linux-Noob Forums

Full Version: Security Patches
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

OK I am curious about security patches on how they work here is a snip

of the IPB patch:

 



Code:
Index: sources/ipsclass.php
===================================================================
--- sources/ipsclass.php        (revision 113)
+++ sources/ipsclass.php        (revision 114)
@@ -2481,7 +2481,7 @@
                            {
                                    foreach( $farray as $id => $stamp )
                                    {
-                                               $this->forum_read[$id] = $stamp;
+                                               $this->forum_read[ intval($id) ] = intval($stamp);
                                    }
                            }
                    }
@@ -3517,7 +3517,31 @@
    }
}




 

Can anyone explain what each line does here is what I think they do:

 

--- sources/ipsclass.php (revision 113)

Does this live remove the word (revision 113)

 

+++ sources/ipsclass.php (revision 114)

Does this line add (revision 114)

 

@@ -2481,7 +2481,7 @@

Not sure here

 

I am assuming that + at the front means add and - at the front means remove.

 

anyone want to explain :)


Nothing special with these

 



Code:
--- PATH/FILENAME (PREVIOUS REVISION)
+++ PATH/FILENAME (NEW REVISION)
@@ -OLDSTARTLINE,NO OF LINES +NEWSTARTLINE,NO OF LINES @@

THE PATCH MATCHING SECTION

-  OLD LINES
+ NEW REPLACING LINES

THE PATCH MATCHING SECTION




 

Hope that makes sense?

 

Oh the Previous revision should be the revision that you are actually patching...

Yea that explianed good :)