aboutsummaryrefslogtreecommitdiffstats
path: root/g10/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/misc.c')
-rw-r--r--g10/misc.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/g10/misc.c b/g10/misc.c
index 99c6bb7b9..f1afa4a18 100644
--- a/g10/misc.c
+++ b/g10/misc.c
@@ -509,14 +509,22 @@ pct_expando(const char *string,PKT_public_key *pk)
}
break;
- /* photo type. For now, it's always jpeg so this is
+ /* photo types. For now, it's always jpeg so this is
easy! */
case 't':
- if(idx+4>maxlen)
+ if(idx+3>maxlen)
goto fail;
- strcpy(&ret[idx],"jpeg");
- idx+=4;
+ strcpy(&ret[idx],"jpg");
+ idx+=3;
+ break;
+
+ case 'T':
+ if(idx+10>maxlen)
+ goto fail;
+
+ strcpy(&ret[idx],"image/jpeg");
+ idx+=10;
break;
case '%':