summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Changelog and newsghostpdl-9.22rc1Chris Liddell2017-09-122-28/+9188
|
* Update docs dates etc for releaseChris Liddell2017-09-1261-78/+78
|
* Product string and date for releaseChris Liddell2017-09-122-2/+2
|
* PDF interpreter - handle invalid XRefStm in hybrid PDF fileKen Sharp2017-09-121-2/+10
| | | | | | | Bug #698519 "Invalid XRefStm exits with error" Just wrap the 'readpdf15xref pop' in a stopped if the user has not set PDFSTOPONERROR, also add mark/cleartomark to clean up the stack.
* Coverity ID 94477 and 158386Ray Johnston2017-09-111-3/+8
| | | | | | | | | | | 94477 suggests a potential access (as an array pcc[i]) past the singelton address which could occur if pgs->color_component_map.num_components > 1 Copy the "all" value to an array to prevent the issue. 158386 was a mistake, fixed. Two differences show up with bitrgbtags, but they look the same to me. tests_private/comparefiles/Altona_Technical_v20_x4.pdf tests_private/comparefiles/eci_altona-test-suite-v2_technical2_x4.pdf
* Coverity ID 107344 and 107345, again....Ken Sharp2017-09-111-4/+8
| | | | | | | When testing the return value from ftell() don't assign it to an unsigned int.... Warning from clang this time
* Coverity ID 94485 revisitedKen Sharp2017-09-111-1/+1
| | | | | another place to check that fw is not negative. Missed the fact there were two instances with the first commit.
* Coverity IDs 107344, 107345 revisitedKen Sharp2017-09-111-0/+7
| | | | Check return values from ftell() as well as fseek()
* Coverity ID 171512Ken Sharp2017-09-111-2/+13
| | | | Check return values from seek and propagate errors if encountered.
* Coverity IDs 171513 and 171514Ken Sharp2017-09-111-0/+9
| | | | | prevent potential divide by zero errors. Instead, propagate error return codes.
* Adjust .genordered 50% gray level to be on an desirable boundaryRay Johnston2017-09-101-5/+6
| | | | | | | Customer needs 50% gray level with 45 degree Angle and DotShape 8 to be a checkerboard pattern with no stray dots. Add a check to force the step at 50% to be an even number of dots. Tested for Frequency from 30 to 150 (at 600 dpi).
* Coverity ID 94999Ken Sharp2017-09-071-0/+9
| | | | | | | | | | I don't believe its actually possible to end up at the if (swap) without setting run, because the few cases in the switch where we don't set run, we go back to the top, swap the source and texture, and then do the switch again, so somehow we will end up setting run But its cheap to initialise it, and it will silence Coverity, and it guards against any possible future problem.
* Compiler warning: discaring constChris Liddell2017-09-071-1/+1
| | | | | | The fix for coverity ID# 127201 introduced a compiler warning due to an accessor macro (ctm_only) implicitly adding const. Make the local variable const, too.
* Coverity ID# 94891Chris Liddell2017-09-071-1/+1
| | | | Add a cast to make integer division explicit.
* Coverity ID 94819Ken Sharp2017-09-071-2/+2
| | | | | | No structural changes, just change a couple of pointer type declarations I think this should satisfy Coverity and there doesn't seem to be any actual problem here.
* Coverity ID 158370Ken Sharp2017-09-071-0/+1
| | | | | | | | Again we shouldn't be able to get to the flagged code with 'raster' being uninitialised, because 'data', which is initialised to 0 would have to be updated, and that would mean raster was updated as well. But since we already initialise data its cheap to initialise raster too.
* Coverity ID 94819Ken Sharp2017-09-071-15/+21
| | | | | | | | | | | | | | The comments on clist_end_page() state that it returns negative for an error, 0 for success and positive for success with a low memory warning. In fact it always returns 0. This means we don't conform to the comments, and discard any errors that occur. This commit reformats the code to reduce the number of tests and to store the error codes, as well as adding the potential to return something other than 0.
* Coverity ID 94571Ken Sharp2017-09-071-2/+6
| | | | | | Its not obvious whether raster can ever be 0 here, it clearly never is during our tests, and I think it should not be possible, but just in case we'll guard the division with a check.
* Fix memory leakKen Sharp2017-09-071-0/+2
| | | | | An error exit would leave 'filter' and 'screen_blur' allocated, and therefore a memory leak.
* Second fix for missing FULL_FILE_NAME_LENGTHRay Johnston2017-09-062-2/+8
| | | | | | | | Previous commit fixed the RAW_SCREEN_DUMP=1 case, but broke the normal case. Also added #ifndef RAW_SCREEN_DUMP around the setting in gen_odrered.h so that the preprocesor flag could be set via the command line. Lastly, add base/gen_ordered.h to the Headers section of the .vcproj
* Fix RAW_SCREEN_DUMP for gen_ordered standaloneRay Johnston2017-09-062-2/+4
| | | | | | In refactoring, I missed that FUL_FILE_NAME_LENGTH was needed if RAW_SCREEN_DUMP was > 0 (RAW_SCREEN_DUMP is #define'd in genordered.h, so put the definition there.).
* Coverity ID 94886Ken Sharp2017-09-061-2/+1
| | | | | | | Remove a NULL pointer check, there's no possible way the pointer can be NULL at this point. Or if there is, its because a NULL pointer was passed in as an argument, and we will seg fault earlier in this function anyway, so no point in checking it here.
* Coverity ID 94627Ken Sharp2017-09-061-1/+2
| | | | | Guard the dereference of pdht with a NULL pointer test, to avoid a potential seg fault.
* Coverity ID 141334Ken Sharp2017-09-061-1/+3
| | | | Add some error checking
* Coverity ID 95001Ken Sharp2017-09-061-1/+0
| | | | | | | | We can only get back here by jumping to the label 'top'. ymax is not used between this point and the last 'goto top', and it is then recalculated before being used. So the assignment is indeed pointless.
* Coverity IDs 164020, 164022, 164025Ken Sharp2017-09-061-8/+8
| | | | | | | | | | We don't need to check if dot_grid.data is NULL. Testing a == 0 && b == 0 after testing a nd b individually can't be correct. Test for both being zero first. In the case of an error, we could attempt to free memory that had not been allocated. Prevent this by checking dot_level_pos is non-NULL.
* Addition to commit 18f009a08f1eac4708188b516d375356a502a3b1Ken Sharp2017-09-061-1/+1
| | | | Forgot to initialise the pointer to NULL before starting.
* Coverity IDs 138751, 141130, 141131, 158373Ken Sharp2017-09-061-2/+15
| | | | | | | | | | | | 138751 - The code assumes that a separating device has an ICC profile but doesn't check. Add a check and return an error if it doesn't. 141130 - initialise a structure member 141131 - check and action return codes 158373 put #if DEBUG round some code that's only present to provide a breakpoint location in debuggers. (and told Coverity to ignore this)
* Coverity ID# 122660Chris Liddell2017-09-051-1/+1
| | | | | NULL pointer check - the code branch above already does so, looks like a simple ommission
* Coverity ID# 126580Chris Liddell2017-09-051-1/+1
| | | | Explicitly promote an unsigned char value to a long.
* Coverity ID# 127201Chris Liddell2017-09-051-1/+2
| | | | | Fix potential NULL pgs (graphics state) pointer dereference. I suspect this can never occur, but it's cheap and should silence coverity
* Coverity ID# 135035Chris Liddell2017-09-051-8/+2
| | | | Remove pointless "upgraded_copypage" code.
* Coverity ID 95054Ken Sharp2017-09-051-0/+1
| | | | Explicitly initialise a member of the new 'order' structure.
* Bug 698471: apply vertical substitute glyphs in TTF fontsChris Liddell2017-09-052-2/+9
| | | | We weren't applying vertical glyph substition (from the gsub table).
* Bug 698486: memory leaks from fontconfig callsChris Liddell2017-09-051-0/+2
| | | | | | Address most of the memory leaks stemming from the use of fontconfig. In this case, just destroying the fontconfig context.
* Coverity ID 139142: etc.c modulo by zeroChris Liddell2017-09-051-1/+1
| | | | | | Only calculate tmline when it will actually be used. The calculation uses y % tmheight, but only the ETS_RSTYLE_THRESHOLD case is called with tmheight != 0
* Coverity ID 94994Ken Sharp2017-09-051-1/+4
| | | | Check a return value and action it.
* Coverity ID 158395Ken Sharp2017-09-051-1/+1
| | | | | | | | I think its not currently possible to trigger this, as it would require setting up the device pointer incorrectly before entering this routine. However Coverity is correct that it appears possible to end up doing a NULL pointer dereference, so add a guard to maek sure that can't happen.
* Coverity ID 94914Ken Sharp2017-09-051-1/+2
| | | | | Remove an unnecessary copy of a variable, its unconditionally overwritten immediately after. Comment that.
* Coverity IDs 94554 and 94551Ken Sharp2017-09-053-12/+21
| | | | | | | | | We weren't checking the return values from gp_fseek_64 or fstat() and in a couple of places weren't even able to return an error anyway (void function). So check the error returns from the C run-time and add error handling as required in order too report these.
* Coverity ID 94959Ken Sharp2017-09-041-1/+6
| | | | | We were failing to free a couple of allocated buffers in the event of an error. The other error test all free both buffers properly.
* Coverity IDs 94868, 94936, 158371Ken Sharp2017-09-041-0/+4
| | | | | Initialise some arrays, these are sparsely populated by the code and potentially possible to access uninitialised data.
* Alter the fix for Coverity ID 94726Ken Sharp2017-09-041-6/+2
| | | | | | Ray objected to my original change, because the debug output would not be a valid file. So instead we choose to lose the information that logbits2 is non-zero and drop the if clause.
* Coverity IDs 94478 and 94485Ken Sharp2017-09-041-2/+2
| | | | | | | | | The first is a clear typo, the code below this point is the same as the code modified in this commit. The second one is less clear, but I think its reasonable, if there is no '0' (-1 return from next_zero()) then we can't make the feature larger by darkening to the right, so darken to the left.
* Coverity ID 94479Ken Sharp2017-09-041-0/+3
| | | | | | | | | | The macro used here says it shouldn't be used for run-time calculations. However this code does use it, I'm not certain for what purpose. Since it clearly is possible to get a negative shift, add a guard to the values to make sure that can't happen. Since this code is conditionally compiled out, anyone who compiled it in and finds a problem can easily fix it.
* Coverity ID 127202Ken Sharp2017-09-041-4/+3
| | | | | | Check the stored graphics state and if its 0, use the default method. Remove the now redundant later check on pgs being 0 before use.
* Coverity IDs 94503, 94506, 94523, 94536Ken Sharp2017-09-041-5/+4
| | | | | | | A number of pointless comparisons, checking that a signed 32-bit variable had a value less than the maximum for a signed 32-bit integer. Remove them all.
* Coverity IDs 94719, 94889, 94912, 94967, 95088, 101187Ken Sharp2017-09-041-27/+21
| | | | | | | | | | | | | Return an error instead of storing it (where it gets lost) As per gdevpsd.c and gdevprf.c refactor the #if conditional compiled code to remove a variable and get rid of Coverity warning. In the 'build_cmyk_raster_line_fromplanar* routines, pass the params as a pointer instead of copying the whole 500+ byte structure around. Finally, not a Coverity warning but a compiler warning; remove an unused variable.
* Coverity IDs 94856 and 94719Ken Sharp2017-09-041-1/+3
| | | | | | | | | | | If we get an error from param_read_name, then just return it. The AddLut lookup is less obvious. Clearly the size of the LUT read from the config file should not be less than 0, but there's no clear upper limit (other than an unsigned integer). However a 4Gb config file seems unlikely. The only example we have has ~23 values for each plane, so a limit of 256 entries seems reasonable. If anyone complains its easy to increase and we can ask the user what a reasonable limit should be.
* Coverity ID 94728Ken Sharp2017-09-041-13/+8
| | | | | As with gdevgprf.c, refactor the #if conditional compilation so that we don't need a variable, and remove the Coverity warning.