diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-04-05 12:48:19 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-04-05 12:48:19 +0100 |
commit | 4184ba5d2930b337fddf3ad8e612a88adb08d8c1 (patch) | |
tree | 59b4e5f9c5abefb3f93ee235887945a4f1faa597 /apps | |
parent | b32c5d4f88835ad7b36946f8fcec47e809bcd11b (diff) | |
download | mupdf-4184ba5d2930b337fddf3ad8e612a88adb08d8c1.tar.xz |
Don't unlock a lock we don't own.
While debugging Bug 692943, I spotted a case where we can attempt to
unlock the file while we don't hold the file lock due to an error
being thrown while we momentarily drop that lock. Simple solution
is to add a new fz_try()/fz_catch() to retake the lock in such
an error circumstance.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/pdfapp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/pdfapp.c b/apps/pdfapp.c index 55cecb16..8fca5713 100644 --- a/apps/pdfapp.c +++ b/apps/pdfapp.c @@ -310,7 +310,7 @@ static void pdfapp_showpage(pdfapp_t *app, int loadpage, int drawpage, int repai sprintf(buf2, " - %d/%d (%d dpi)", app->pageno, app->pagecount, app->resolution); len = MAX_TITLE-strlen(buf2); - if (strlen(app->doctitle) > len) + if ((int)strlen(app->doctitle) > len) { snprintf(buf, len-3, "%s", app->doctitle); strcat(buf, "..."); |