> On 2012-01-09 06:48:40, Yuri Zelikov wrote:
> > /src/org/waveprotocol/box/server/persistence/file/FileDeltaCollection.java, 
> > line 512
> > <https://reviews.apache.org/r/3432/diff/1/?file=67165#file67165line512>
> >
> >     IMO, it's not correct to substitute negative number with zero here. 
> > FileDeltaCollection should fail in this case and let the caller deal with 
> > the consequences, i.e. WaveMap.
> >
> 
> Ali Lown wrote:
>     Very well. I shall close this request and let you tidy and merge review 
> 3431 instead.

"byte[] bytes = new byte[transformedDeltaLength]";

How about just throw an IOException [i.e. throw new IOException("Invalid delta 
length etc...", e)] if it is negative value and at least we still have the 
procedure to catch and log any exception. If the value of 
transformedDeltaLength is negative it will throws 
"java.lang.NegativeArraySizeException". Just a thought.


- Raymond


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3432/#review4262
-----------------------------------------------------------


On 2012-01-08 23:28:50, Ali Lown wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/3432/
> -----------------------------------------------------------
> 
> (Updated 2012-01-08 23:28:50)
> 
> 
> Review request for wave, Yuri Zelikov and Lennard de Rijk.
> 
> 
> Summary
> -------
> 
> Nothing exciting in this patch, just prevents the length being processed as 
> <0 (causing a whole server crash) for an uncaught exception.
> 
> This lets the server boot (which is much more important that a few corrupt 
> deltas), and the rest of the persistence layer still leaves a SEVERE in my 
> logs to tell me about the corrupt delta in the wave.
> 
> As for how it got corrupt I don't know so I can't address that actual issue.
> 
> 
> This addresses bug WAVE-321.
>     https://issues.apache.org/jira/browse/WAVE-321
> 
> 
> Diffs
> -----
> 
>   /src/org/waveprotocol/box/server/persistence/file/FileDeltaCollection.java 
> 1228763 
> 
> Diff: https://reviews.apache.org/r/3432/diff
> 
> 
> Testing
> -------
> 
> I wrote, compiled and deployed. Then my server booted again.
> 
> 
> Thanks,
> 
> Ali
> 
>

Reply via email to