News for hackers. Stuff that matters.
Re:Dreamweaver CS3 crashes with files that are exactly 8KB i... by userbinator on Thursday December 25, 2014 @09:24PM (#8797796)
How does this happen? My guess is there is a loop that processes file contents in 8KB blocks, something like this:

    bytesRemaining = fileSize;
    while(...) {
        ...
        bytesRemaining -= 8192;
        if(bytesRemaining < 0)
            break;
        ...
    }
    bytesRemaining += 8192;
    ...
    // process remaining bytes

See the bug? :-)
Re:Dreamweaver CS3 crashes with files that are exactly 8KB i... by Diamons on Thursday December 25, 2014 @11:46PM (#8798082)
The power of the almighty equal sign
Re:Dreamweaver CS3 crashes with files that are exactly 8KB i... by meowface on Thursday December 25, 2014 @09:56PM (#8797849)
Very likely something like this or similar to this.
Re:Dreamweaver CS3 crashes with files that are exactly 8KB i... by derekchiang on Friday December 26, 2014 @12:13AM (#8798126)
If this was the case then any multiple of 8KB should also cause the bug to happen, but according to OP only exactly 8KB causes the bug.
Re:Dreamweaver CS3 crashes with files that are exactly 8KB i... by kvirani on Friday December 26, 2014 @12:14AM (#8798130)
"and is caused by the presence of a file that's exactly 8,192 bytes (8KB) or a multiple thereof."
Re:Dreamweaver CS3 crashes with files that are exactly 8KB i... by JoshCole on Friday December 26, 2014 @12:14AM (#8798128)
The article itself says that multiples do cause the bug.
Re:Dreamweaver CS3 crashes with files that are exactly 8KB i... by jerryr on Friday December 26, 2014 @12:23AM (#8798142)
Yes. The while statement can't take variable arguments. Also, ellipsis is not a standalone expression. Also, if "fileSize" is exactly 8192 then ellipsis will execute because "bytesRemaining" will equal zero. If your compiler actually compiles ellipsis and "fileSize" is exactly 8192, then something bad will probably happen. Either the undefined behavior of the compiled ellipses or the unexpected negative number will likely cause a crash.

Edit: I guess that was funnier in my head.