~vorlon/ubuntu/oneiric/lcms/multiarch

« back to all changes in this revision

Viewing changes to src/cmserr.c

  • Committer: Bazaar Package Importer
  • Author(s): Oleksandr Moskalenko
  • Date: 2008-07-24 14:29:36 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080724142936-9fgs00bge01jgdl5
Tags: 1.17.dfsg-1
Removed Adobe sRGB profiles from the testdbed and python/testbed
directories (Closes: #491995).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//
2
2
//  Little cms
3
 
//  Copyright (C) 1998-2006 Marti Maria
 
3
//  Copyright (C) 1998-2007 Marti Maria
4
4
//
5
5
// Permission is hereby granted, free of charge, to any person obtaining 
6
6
// a copy of this software and associated documentation files (the "Software"), 
28
28
// errors.
29
29
 
30
30
void cdecl cmsSignalError(int ErrorCode, const char *ErrorText, ...);
 
31
 
31
32
int  LCMSEXPORT cmsErrorAction(int lAbort);
32
33
void LCMSEXPORT cmsSetErrorHandler(cmsErrorHandlerFunction Fn);
33
34
 
67
68
 
68
69
            char Buffer[1024];
69
70
 
70
 
            vsprintf(Buffer, ErrorText, args);
 
71
            vsnprintf(Buffer, 1023, ErrorText, args);
71
72
            va_end(args);   
72
73
 
73
74
            if (UserErrorHandler(ErrorCode, Buffer)) {     
89
90
              char Buffer1[1024];
90
91
              char Buffer2[256];
91
92
 
92
 
              sprintf(Buffer1, "Error #%x; ", ErrorCode);
93
 
              vsprintf(Buffer2, ErrorText, args);
 
93
              snprintf(Buffer1,  767, "Error #%x; ", ErrorCode);
 
94
              vsnprintf(Buffer2, 255, ErrorText, args);
94
95
              strcat(Buffer1, Buffer2);
95
96
              MessageBox(NULL, Buffer1, "Little cms",
96
97
                                          MB_OK|MB_ICONSTOP|MB_TASKMODAL);