bugGKSu - Bugs: bug #32347, I found something unoptimal in...


bug #32347: I found something unoptimal in sourcecode.

Submitted by:  None
Submitted on:  Fri 04 Feb 2011 01:39:23 AM UTC  
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Fri 04 Feb 2011 01:39:23 AM UTC, original submission:

I'm not a member of your community and wont to be him (at least at this time).
But I'm interested in your code. I found a part of it unoptimal (it's my opinion, it may be wrong, because i'm not qualified in programming - i'm just studying (and it's the reason for analysis of your source code)).

From words to action:

in libgksu.c:

/* we cannot pass 'password' as it has no \n */
pass = g_strdup_printf ("%s\n", password);
write (fdpty, pass, strlen(pass));

/* cleans the memory */
gksu_secure_free (pass);
gksu_secure_free (password);

may be:

write (fdpty, password, strlen(password));
write (fdpty, \n, 1);
gksu_secure_free (password);

we no need the `pass` variable, we no need `g_strdup_printf`.

Am I wrong?

Sorry for my bad english.
My public e-mail: -email is unavailable-



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.




No changes have been made to this item

Back to the top

Powered by Savane 3.3