Blame SOURCES/djvulibre-3.5.27-djvuport-stack-overflow.patch
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
diff --git a/libdjvu/DjVuPort.cpp b/libdjvu/DjVuPort.cpp
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
index 2b3e0d2..ede7f6b 100644
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
--- a/libdjvu/DjVuPort.cpp
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
+++ b/libdjvu/DjVuPort.cpp
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
@@ -507,10 +507,19 @@ GP<DjVuFile>
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
DjVuPortcaster::id_to_file(const DjVuPort * source, const GUTF8String &id)
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
{
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
GPList<DjVuPort> list;
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
+
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
+ if (!!opening_id && opening_id == id)
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
+ G_THROW("DjVuPortcaster: recursive opening of the same file (corrupted file?)");
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
+ else
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
+ opening_id = id;
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
+
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
compute_closure(source, list, true);
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
GP<DjVuFile> file;
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
for(GPosition pos=list;pos;++pos)
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
if ((file=list[pos]->id_to_file(source, id))) break;
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
+
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
+ opening_id = GUTF8String();
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
+
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
return file;
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
}
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
diff --git a/libdjvu/DjVuPort.h b/libdjvu/DjVuPort.h
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
index e2b3125..313dc2b 100644
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
--- a/libdjvu/DjVuPort.h
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
+++ b/libdjvu/DjVuPort.h
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
@@ -484,6 +484,7 @@ private:
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
const DjVuPort *dst, int distance);
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
void compute_closure(const DjVuPort *src, GPList<DjVuPort> &list,
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
bool sorted=false);
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
+ GUTF8String opening_id;
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
};
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
|
|
![](https://seccdn.libravatar.org/avatar/d50945d53b81afb224bf04487323c9a3f0d507badb42ee4509fe63d4369afbe1?s=16&d=retro) |
3e9165 |
|