summaryrefslogtreecommitdiff
path: root/ext/standard/iptc.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/iptc.c')
-rw-r--r--ext/standard/iptc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c
index cea43dd8d3..e815c6bfb1 100644
--- a/ext/standard/iptc.c
+++ b/ext/standard/iptc.c
@@ -178,13 +178,13 @@ static char psheader[] = "\xFF\xED\0\0Photoshop 3.0\08BIM\x04\x04\0\0\0\0";
PHP_FUNCTION(iptcembed)
{
char *iptcdata, *jpeg_file;
- int iptcdata_len, jpeg_file_len;
- long spool = 0;
+ size_t iptcdata_len, jpeg_file_len;
+ zend_long spool = 0;
FILE *fp;
unsigned int marker, done = 0;
int inx;
unsigned char *spoolbuf = NULL, *poi = NULL;
- struct stat sb;
+ zend_stat_t sb;
zend_bool written = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sp|l", &iptcdata, &iptcdata_len, &jpeg_file, &jpeg_file_len, &spool) != SUCCESS) {
@@ -201,7 +201,7 @@ PHP_FUNCTION(iptcembed)
}
if (spool < 2) {
- fstat(fileno(fp), &sb);
+ zend_fstat(fileno(fp), &sb);
poi = spoolbuf = safe_emalloc(1, iptcdata_len + sizeof(psheader) + sb.st_size + 1024, 1);
memset(poi, 0, iptcdata_len + sizeof(psheader) + sb.st_size + 1024 + 1);
@@ -302,7 +302,7 @@ PHP_FUNCTION(iptcparse)
unsigned int tagsfound = 0;
unsigned char *buffer, recnum, dataset, key[ 16 ];
char *str;
- int str_len;
+ size_t str_len;
zval values, *element;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) != SUCCESS) {
@@ -334,8 +334,8 @@ PHP_FUNCTION(iptcparse)
if((inx+6) >= str_len) {
break;
}
- len = (((long) buffer[ inx + 2 ]) << 24) + (((long) buffer[ inx + 3 ]) << 16) +
- (((long) buffer[ inx + 4 ]) << 8) + (((long) buffer[ inx + 5 ]));
+ len = (((zend_long) buffer[ inx + 2 ]) << 24) + (((zend_long) buffer[ inx + 3 ]) << 16) +
+ (((zend_long) buffer[ inx + 4 ]) << 8) + (((zend_long) buffer[ inx + 5 ]));
inx += 6;
} else { /* short tag */
len = (((unsigned short) buffer[ inx ])<<8) | (unsigned short)buffer[ inx+1 ];