diff options
| -rw-r--r-- | fs/ecryptfs/keystore.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c index 635e8e16a5b7..917bd5c9776a 100644 --- a/fs/ecryptfs/keystore.c +++ b/fs/ecryptfs/keystore.c | |||
| @@ -100,12 +100,12 @@ int ecryptfs_parse_packet_length(unsigned char *data, size_t *size, | |||
| 100 | (*size) = 0; | 100 | (*size) = 0; |
| 101 | if (data[0] < 192) { | 101 | if (data[0] < 192) { |
| 102 | /* One-byte length */ | 102 | /* One-byte length */ |
| 103 | (*size) = (unsigned char)data[0]; | 103 | (*size) = data[0]; |
| 104 | (*length_size) = 1; | 104 | (*length_size) = 1; |
| 105 | } else if (data[0] < 224) { | 105 | } else if (data[0] < 224) { |
| 106 | /* Two-byte length */ | 106 | /* Two-byte length */ |
| 107 | (*size) = (((unsigned char)(data[0]) - 192) * 256); | 107 | (*size) = (data[0] - 192) * 256; |
| 108 | (*size) += ((unsigned char)(data[1]) + 192); | 108 | (*size) += data[1] + 192; |
| 109 | (*length_size) = 2; | 109 | (*length_size) = 2; |
| 110 | } else if (data[0] == 255) { | 110 | } else if (data[0] == 255) { |
| 111 | /* If support is added, adjust ECRYPTFS_MAX_PKT_LEN_SIZE */ | 111 | /* If support is added, adjust ECRYPTFS_MAX_PKT_LEN_SIZE */ |
