[Haiku-commits] r24649 - haiku/trunk/src/bin/makebootable/platform/bios_ia32

Ingo Weinhold ingo_weinhold at gmx.de
Sat Mar 29 14:50:50 CET 2008


On 2008-03-29 at 13:59:13 [+0100], korli at BerliOS <korli at mail.berlios.de> 
wrote:
> Author: korli
> Date: 2008-03-29 13:59:12 +0100 (Sat, 29 Mar 2008)
> New Revision: 24649
> ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=24649&view=rev
> 
> Modified:
>    haiku/trunk/src/bin/makebootable/platform/bios_ia32/makebootable.cpp
> Log:
> assume the partition offset is zero when the device name terminates with 
> /raw
> 
> 
> Modified: 
> haiku/trunk/src/bin/makebootable/platform/bios_ia32/makebootable.cpp
> ===================================================================
> --- haiku/trunk/src/bin/makebootable/platform/bios_ia32/makebootable.cpp    
> 2008-03-29 12:58:20 UTC (rev 24648)
> +++ haiku/trunk/src/bin/makebootable/platform/bios_ia32/makebootable.cpp    
> 2008-03-29 12:59:12 UTC (rev 24649)
> @@ -478,7 +478,7 @@
>          #ifdef __BEOS__
>  
>              // get a partition info
> -            if (!noPartition) {
> +            if (!noPartition && strncmp("/raw", fileName + 
> strlen(fileName) - 4, 4)) {

This will access invalid memory, if the name is shorter than 4 chars, which 
is not even completely unlikely, since partition names are rather short and 
one could "cd" into their directory first.

CU, Ingo



More information about the Haiku-commits mailing list